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
Michael DsozaMichael Dsoza 

Visualforce email template images are showing in preview but not at receiver email.

Hi,

I have created one visualforce email template to send email alert.
In Preview, banner images are showing but whenever i receive email, instead of image it shows blank box.

Code used 
<img src="https://c.ap1.content.force.com/servlet/servlet.FileDownload?file=01590000004wqi7" width="100%" height="100"/> OR
<apex:image url="https://c.ap1.content.force.com/servlet/servlet.FileDownload?file=01590000004wqjZ" width="100%" />

Also, How can we use Letterhead in visualforce email templates ??

Thanks :)
bob_buzzardbob_buzzard
Assuming that's the actual URL of the image, when I try to access this I get sent to the Salesforce login screen, which implies the images aren't available externally.
ShashForceShashForce
Hi Michael,

If the image is stored as a dicument in salesforce, please ensure that the option "Externally Available Image" is checked and "Internal Use Only" is unchecked on the document record page.

To use letterheads in visualforce email templates, you should upload the letterhead image file as a document in salesforce, make sure it is externally available, and include the image in the visualforce template. Please see this for help: https://help.salesforce.com/HTViewHelpDoc?id=email_template_images.htm&language=en_US

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
Michael DsozaMichael Dsoza
Hi,

Thanks alot for all your support.

All images are stores in document in salesforce and option "Externally Available Image" is checked.
Then I clicked on view button of document, and it is opened in side window from where I copied the url of an image. Is this a server side URL for an image ??
If No then please let me know how can I get server side URL for an image which is stored in document tab ?

Thanks
Michael
Michael DsozaMichael Dsoza
Hi,

Found public URL for an image which is stored in document tab in salesforce & it worked well for me...:) :) :)

Thanks
Michael
Michael DsozaMichael Dsoza
Hi,

How can I get letterhead image file ? 
I want to use letterhead with its layout across all templates rather than creating header and footer in all email templates.

Please explain me how can I get letterhead image file ?

Thanks 
Michael