You need to sign in to do that
Don't have an account?
Roshan 10
While sending email through Apex using Classic Email templates can we modify the contents of the email before sending
I would like to explore the option of sending email through Apex. I was reading through the Messaging.SingleEmailMessage class. Can we specify setTemplateId and then modify the contents of the template before sending
I am planning to have placeholder text in the template and before sending I would like to modify it in Apex
I am planning to have placeholder text in the template and before sending I would like to modify it in Apex
Yes you can modify the content of the email in your apex class before sending it to the users, please have a look at the code snippet below:
Let me know if you need any other help on this.
Thanks,
Abhishek Bansal.
https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_email_outbound_single.htm#apex_Messaging_SingleEmailMessage_setTreatBodiesAsTemplate