You need to sign in to do that
Don't have an account?
Philip Gulan
What is Apex Code to send mass email to List<Contact> by selecting an email template?
Hi,
I want to write Apex code to send mass email to a selected contact list - List<Contact> - and select an email template.
Any help is apperciated.
Thanks
I want to write Apex code to send mass email to a selected contact list - List<Contact> - and select an email template.
Any help is apperciated.
Thanks
You can use this code .
Any issue ask me .
Regards ,
harish.R
this is single but selection templte is available modify above and last time code .
Regards,
Harish.R.
I have prepared the following code by help of a friend and it is working fine.
I need to know how I can pass the template ID instead of giving a hardcode, so that the admin can change the seleted email template.
EmailTemplate et = [SELECT Id, Name FROM EmailTemplate WHERE Name = 'Lead Email Template' LIMIT 1];
Messaging.MassEmailMessage mail = new Messaging.MassEmailMessage();
mail.setTemplateId(et.Id);