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
Bernd NawrathBernd Nawrath 

PDF attachment in email template

good evening dear community,I created an email template for a pdf that is supposed to be sent whenever a new account is added. I just want make sure my code looks good.
I'd be happy if you had any advices.

<messaging:emailTemplate subject="Mandat" recipientType="Contact" relatedToType="Account">
<messaging:plainTextEmailBody >
Dear customer....
</messaging:plainTextEmailBody>
<messaging:attachment renderAs="PDF"> <!-- Use the renderAs attribute here.-->
    <c:NeuesMandat ></c:NeuesMandat><!--gives the reference of the component-->
</messaging:attachment>
</messaging:emailTemplate>

thanks in advance:)
PratikPratik (Salesforce Developers) 
Hi Bernd,

Thanks for sharing the details with community. Is this code working as per desired or is there any issues?

Thanks,
Pratik