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
Kaplan EladKaplan Elad 

Add existing Attachments to Visualforce Email template

I have a requirement to add existing Attachments to a visualforce email template.

I want to add Attachments under a specific Case (from "Notes & Attachments") to send it to Contacts.

Any idea if it's possible and how do I do it ?

Thanks!!
Robert_StrunkRobert_Strunk
I personally haven't done much with VF email templates but I don't see any reason why you couldn't grab the attachment in your template controller and then do a getContent() or getContentAsPDF() call and slap the that into an <messaging:attachment> that is inside of your template.  In theory (at least in my head) that should do the trick.  

Hope that helps or at least gets you in the right direction.