1

This is the code I have written thus far:

<messaging:emailTemplate subject="Your Offering Listing"
    recipientType="Contact"
    relatedToType="vlocity_ps__InventoryItem__c">

<messaging:htmlEmailBody >
 <html>
   <body>

<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:repeat>

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

   </body>

 </html>

</messaging:htmlEmailBody>

</messaging:emailTemplate>

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.

0

You must log in to answer this question.