function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ken@ExternalITKen@ExternalIT 

Adding images to Custom HTML email templates

We are trying to create a Custom HTML email template. We have followed the instructions from  "Creating HTML Email Templates". The problem is trying to add images to our new custom email template. We have loaded all of the images into a "Document" folder, however we don't know how to reference where these images are stored.

 

The example given is confusing.

<img src="https://na2.salesforce.com/servlet/servlet.ImageServer? id=015D0000000Dpwc&oid=00DD0000000FHaG&lastMod=1270576568000" alt="Company Logo" height="64" width="64"/>

 

What should we do to reference our specific images?

What folder should we upload the images to. We have a custom html template and all we need is to be able to upload the images (changing the "img src" will be easy once we know where that folder with images is) 

 

Thank you

EIE50EIE50

Hi,

 

First upload the images to the documents and make them externally visible while uploading. After uploading, click on the image link to open the image and then do a right click and go to properties to get the path for the image and include this path in your email template.

 

Thanks.

SabrentSabrent

 <img src="https://na2.salesforce.com/servlet/servlet.ImageServer?id=015D0000000Dpwc&oid=00DD0000000FHaG&lastMod=127 0576568000" alt="Company Logo" height="64" width="64"/>

 

For your understanding I have broken the source URL  so you know where to get these from,

 

https://na2.salesforce.com/servlet/servlet.ImageServer? - This is the URL of the document. To get this go to  Documents Tab, Click the 'Go' button, Locate the image, click 'View'

 

id=015D0000000Dpwc  - This is the record ID of the document. The 15 digit id in the above URL

 

oid=00DD0000000FHaG - This is your org id found in Settings > Company Profile >Company Info

 

lastMod=127 0576568000 - I don't know why this is used, as never used it in any of my custom email templates.

 

If you have questions, feel free to ask.

 

 

 

 

 

 

 

 

 

 

 

 

Pal2011Pal2011

Hi,

 

I'm using the same code to display image with custom template, but for some reason I cannot see the image portion. I have also uploaded image under the salesforce.com documents and made it available for external use.

 

Thanks,

SabrentSabrent

within your HTML tag in the custom email template,copy this URL


<img src="
https://nax.salesforce.com/servlet/servlet.ImageServer?id=XXXXXXXXXXX&oid=XXXXXXX" height="90" width="600"/> <br/><br/>


replace nax with your salesforce instance
replace id with the record ID of your document. (see instructions by EIE50 above )
replace oid with your org id found in Settings > Company Profile >Company Info