I'm trying to send an email with an attachment that is pulled in via a link, eg.

<apex:image url="{!URLFOR($Action.Attachment.Download, attachmentId)}" />

And the goal is to be able to have the images that are attached to the mail that were pulled in from the object viewable in the email.

In other words, I want to be able to send an email from Salesforce that includes images that have been attached to an object so when the person opens the mail, the images are displayed.

The only way I can see this being done is uploading them to document storage and populating them from there?

Anyone have an idea?



1 Answer 1


Ok, I figured this out. You can upload the images to "content" or migrate it from attachments, create an externally facing "site", then use the URL for the site as the direct URL. Then add the following:


In the above, http://staging-yoursite.cs9.force.com/salesoffer/ is my SF site (direct URL), then /servlet/servlet.FileDownload?file={!quote.operator.field_with_ID} references the ID (in my case a field that has the ID of the image).

Pretty simple - haven't tested it on all clients, but seems to work in Gmail, Mac, iPhone, etc.

You must log in to answer this question.

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