0

I am using vf template for email. When email is viewed in Outlook, i am not able to see the image i have embedded. Below is the template code. Please let me know where it is going wrong.

<messaging:emailTemplate recipientType="Contact" relatedToType="Task__c"
subject="Reg : New Task Assignment to Task Executioner : {!relatedTo.Task_Executioner1__c} " >
<messaging:htmlEmailBody >
<html>
<body>
<font face="arial" size="2">
Dear {!relatedTo.Task_Executioner__r.Name}, <br/> <br/>

User {!RelatedTo.Project__r.Project_Manager__r.Name} has assigned new tasks related to Project <br/> <apex:outputLink value="https://test.salesforce.com/{!RelatedTo.Project__r.id}" target="_blank">{!RelatedTo.Project__r.Name}</apex:outputLink>

<br/> <br/>
<c:send_NewTasks ToID="{!RelatedTo.Project__c}" />
<br/> <br/>
<footer>
Regards,<br/>
Internal Project Management Application <br/>
Please donot respond to this e-mail as this mail box is not monitored.
<apex:image id="Logo" value="https://c.cs18.content.force.com/servlet/servlet.ImageServer?id=01511000000QLr9&oid=00D1100000C0JoC&lastMod=1423663215000"/>
</footer>
</font>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

2 Answers 2

0

To populate an image into a custom HTML template using HTML tags, you have to pull the URL from the image properties.

Start by uploading the image into the Documents tab. Make sure you check the "Externally Available Image" checkbox. Also make sure the image file extension is an image file (i.e. jpg, bmp, gif, etc.). For example: Company Logo.jpg In the HTML code for the template you must make sure to reference the loaded image in the Documents tab. To use the correct URL in your template, do the following:

  • Upload the image to your documents tab. Make sure it's marked as externally available
  • Open the image
  • Right click on it
  • Select "Copy Image URL" from the menu. You need the image URL, not the Salesforce URL from your browser
  • Paste the URL in your HTML editor. Here is an example: src="https://na15.content.force.com/servlet/servlet.ImageServer?id=015i0000004NOav&oid=00Di0000000jjigiw" alt="Cute pup" />

You can also use a URL of an external website. For example: <img src="http://www.401khelpcenter.com/syndicate/img/AF-Logo_Brown_Small.gif" alt="Logo"/>

It's best to use an image stored in your org, as you will have more control over the image. (link to knowledgebase)

1

I'm guessing the image isn't publicly available.

You can test it by trying to access:

https://c.cs18.content.force.com/servlet/servlet.ImageServer?id=01511000000QLr9&oid=00D1100000C0JoC&lastMod=1423663215000

in another browser / incognito mode etc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .