+ Start a Discussion
SFDC0539SFDC0539 

Visualforce Email template in Messaging email class.

Hi,

 

Is it possible to use visualforce email template in Messaging.SingleEmailMessage method.

 

 

Thanks......

Best Answer chosen by Admin (Salesforce Developers) 
AmitSahuAmitSahu

Yes.

 

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

mail.setTemplateId(EmailTemplate.Id);

 

 

All Answers

AmitSahuAmitSahu

Yes.

 

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

mail.setTemplateId(EmailTemplate.Id);

 

 

This was selected as the best answer
SFDC0539SFDC0539

Thanks a ton. Able to use the template now