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
sumit pawarsumit pawar 

how to create below html body to set in mail?

 how to create below html body to set in mail? i got stuck in following issue...suggest on this..

Hi (contact name), >> contact name is dynamic.

Please check this out for (...) and (....) >> dynamic values.

Regards, ABC

Like set.htmlbody('hi' +contactname+ ','); and now stuck for next one.... above showing like hi(abc),this also wrong. Please help me out...
If i understand your requirement correctly, you can create a visuaforce email template and use merge fields to send this mail updating the fields dynamically:
Hi, you can create the html template in your salesforce org by following the instructions in the link This is a declarative way of creating the html email template.

Also view the below video for your understanding

However, if you want to go above and beyond and go above declarative way, you can consider creating visualforce email template by following the guidelines in the post at the link