0

As per the requirement I'm trying to get the token values of the custom fields like name, date of birth,country, profile pic etc in the civimail .But when the email is sent.The profile picture is not displayed. Since I'm working on matrimonial site. It's mandatory to get the image in the email.Please help me on this. - Yes I want profile picture to be displayed in the email like all other values. I am getting surname,date of birth and Firstname but not profile pic.I am using tokens for custom fields.

Civicrm version- 7.x-4.7.9 I'm using Drupal 7.

The email output is as follows: Singh 1969-04-04 Puneeth, <>profile pic is not displayed.

Html Source of email( I am using Mailtrap)

Singh

1969-04-04

Puneeth

  • Please update this question with details as to what CMS you are using and what versions of both CMS and CiviCRM. – DaveD - BackOffice Thinking Jun 20 '17 at 15:18
  • Please update this question with the URL of the image that is getting embedded in the email. – DaveD - BackOffice Thinking Jun 20 '17 at 15:19
  • Thanks. Based on the details you provided, it does not appear as the image is properly getting added to the email in its html. Perhaps you can provide the source view of the email you are defining. Click the source button in the email WYSIWYG editor and copy the content to your question. – DaveD - BackOffice Thinking Jun 20 '17 at 15:46
  • I am using mailtrap for checking test emails, Content is as follows.<p>Singh</p> <p>1969-04-04</p> <p> <a href='/drupal_KC/civicrm/file?reset=1&amp;id=10&amp;eid=253' class='crm-image-popup' title='a.png'> <i class='crm-i fa-file-image-o'></i> </a></p> <p>Puneeth</p> – preethi Jun 20 '17 at 16:02
  • Thanks for your quick reply. please suggest how I can get the image in email. I also tried including profile pic token within <img src> in the source while sending the email. But still I'm not getting the image – preethi Jun 20 '17 at 16:06
1

Based on the content you provided, the problem I see is the src is missing from the image tag. Be sure the URL you use is fully formed including the domain, ala, src='http://mysite.com/.....' (Well, actually, you don't have a img tag in there.... I think you meant for the i tag to be the image??)

The href you have on the anchor tag has this problem, with the URL not including the actual URL.

Once you get the src set on the image, and if it's still not working, post the HTML from that source view.

| improve this answer | |
  • Thank you for your reply. I'm using tokens for the email, So I am including the token of the image custom field. in the sender email template. The same way I have included for all html elements. But only Image field(profile pic) is not appearing in the email.please suggest – preethi Jun 21 '17 at 15:04
  • Please provide the source of the email you are trying to send. – DaveD - BackOffice Thinking Jun 21 '17 at 15:13
  • This is Source:<p>Surname:{contact.custom_150}</p> <p>DOB:{contact.custom_152}</p> <p>Firstname:&nbsp;{contact.custom_149}</p> <p>profile pic:{contact.custom_173}</p> – preethi Jun 21 '17 at 15:26
  • Okay, cool. I think we are getting close! Can you provide me with a sample of the content of a contact.custom_173 field. I am assuming this custom field is a link field, correct? – DaveD - BackOffice Thinking Jun 21 '17 at 15:44
  • Yes, contact.custom_173 is a image field. In email I'm getting the output this way:Surname:Singh DOB:06/16/1983 12:00AM Firstname: Puneeth profile pic: without image. Thanks for your quick reply – preethi Jun 21 '17 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.