2

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.

3
  • You mean you have a VF email template with attachment, you build a link to emailAuthor.jsp with the template preselected and it doesn't add the attachment? Or are you sending the email form apex code? Your selection of tags is bit confusing...
    – eyescream
    Aug 3, 2014 at 17:06
  • 1
    I have used a VF Template. My attachment is also a dynamically rendered PDF but I am not able to attach PDF to the template. And i am sending that email as from apex code. Aug 3, 2014 at 17:14
  • Have you seen salesforce.com/us/developer/docs/pages/Content/… ?
    – eyescream
    Aug 3, 2014 at 17:20

1 Answer 1

1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .