This is the code I have written thus far:

<messaging:emailTemplate subject="Your Offering Listing"

<messaging:htmlEmailBody >

<p> Congratulations! </p>
<p> This is your new Visualforce Email Template, which displays the photos relating to your listing. </p>

<apex:repeat value="{!relatedTo.Attachments}" var="a">
  <p><a href="{!URLFOR($Action.Attachment.Download, a)}">{!a.Name}</a> ({!a.BodyLength} B)</p>

<apex:outputLink value="https://dev-xyz.cs20.force.com">
   For more detailed information login to the Portal here to see your listing.





My goal is to add an image not as a URL link/attachment but rather as an actual 'visual representation' of the "notes & attachment" record which is a JPEG/PNG file, in this VF E-Mail template code above. Ie. Since it is an E-Mail about a housing listing, the code would pull an image of the house from the attachments related list on the housing record, so that the recipient of this E-mail could see the image of the house that the E-Mail is referring to, without having to click on a URL link to be led to the page where that image is currently being stored.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.