I have a requirement where I need to attach a dynamically generated VF PDF to an email generated with an email template. Though I am able to send the template, I am not able to send the attachment. Please suggest how can this be achieved.
I have a requirement where I need to attach a dynamically generated VF PDF to an email generated with an email template. Though I am able to send the template, I am not able to send the attachment. Please suggest how can this be achieved.
Best Answer
You will need to use the as suggested in comment.
<messaging:attachment renderAs="PDF" filename="yourCases.pdf">
I had a blog post almost years back that you can take help from
http://cloudyworlds.blogspot.in/2012/11/sending-document-as-attachment-in-form.html