+ Start a Discussion
ahammad skahammad sk 

Send mass Email using Visualforce Email Template

Hi,

How to send "Mass Email" using Visualforce Email Template. The Template wil have images, Screenshots and attachments.
 
Best Answer chosen by ahammad sk
goabhigogoabhigo
I assume yiu are sending the email through Apex. If yes, you can specify the templateId in the method like below:

Messaging.MassEmailMessage email = new Messaging.MassEmailMessage(); email.setTargetObjectIds(conIds); email.setTemplateId('00Xi0000000J9hx'); // Instead of hard coding, highly recommend you to use a custom setting and store the template's iD in it and reference the custom setting in the code. OR use describe methods to dynamically get the id.

Does this help? Do let me know.

--
Abhi

If my answer helps to solve the issue/problem/doubt, please mark it as Best Answer; so that people who are stuck in the similar issue get benefitted. 

All Answers

goabhigogoabhigo
I assume yiu are sending the email through Apex. If yes, you can specify the templateId in the method like below:

Messaging.MassEmailMessage email = new Messaging.MassEmailMessage(); email.setTargetObjectIds(conIds); email.setTemplateId('00Xi0000000J9hx'); // Instead of hard coding, highly recommend you to use a custom setting and store the template's iD in it and reference the custom setting in the code. OR use describe methods to dynamically get the id.

Does this help? Do let me know.

--
Abhi

If my answer helps to solve the issue/problem/doubt, please mark it as Best Answer; so that people who are stuck in the similar issue get benefitted. 
This was selected as the best answer
Venu EVenu E
Hello,

MassMailer Make Salesforce Email Limitations a Thing of the Past.

You can save and edit email templates on Salesforce when using MassMailer. By monitoring the performance of your email templates, you can optimize your past templates to improve results and avoid creating the same template more than once. Save time and get better results with MassMailer.

You can play with this app free trail for 15 days -  https://goo.gl/wvcZ3P

Do you want to know more details click here https://goo.gl/e0RtSm

Regards
Venu E