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.
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