1

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?

Thanks.

0

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:

http://staging-yoursite.cs9.force.com/salesoffer/servlet/servlet.FileDownload?file={!quote.operator.field_with_ID}

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.

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.