+ Start a Discussion

Attach Existing Document to E-Mail in Visualforce Page E-Mail Template

The ability to generate and attach a .pdf document to an e-mail generated by an Visualforce Page e-mail template is fairly straightforward using the <messaging:attachment renderAs="pdf"> capability.  However, this method generates a .pdf file from whatever is contained between the <messaging:attachment> and </messaging:attachment> tags.


My problem is that I already have a .pdf document stored in a Documents folder in SFDC and I want to automatically attach that document to an e-mail generated by a Visualforce Page template without the user having to go through the  the document selection and attachment process.  I don't want to have to re-generate the document, just attach it.


Any ideas?


Hi dperkinson,

Did you find a solution for that issue?


i have the same problem.



Thank you


I have a similar problem - a custom object with a pdf attachment. The task is to send an email to the main contact including the attached pdf.


Any ideas or hints?

I'm working on a similar issue right now related to the contracts object - shooting out an attached PDF that is specific to each contract.  Would love any thoughts/suggestions that people may have on how to make this work.