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
SF DakshendraSF Dakshendra 

Hi How to create visual force email template for below html template?

Hi
How to create visual force email template for below html template?


Dear {!Lead.FirstName}:
 
It was a pleasure spending time with you yesterday and today.
 
At one, we enjoy contributing to the continued success of progressive companies like {!Account.Name}. I look forward to continuing our dialogues and will be in touch regarding our discussion. In the mean time, if you have any additional questions, please do not hesitate to contact me directly.
 
Sincerely,
{!User.Name}
{!User.Phone}
{!User.Email}

 
Lokesh KumarLokesh Kumar
Hi Dakshendra,

What is the requirement to go for Visualforce Emai lTemplate same you can achieve through HTML Email Template? like above.

Thanks
Lokesh
SF DakshendraSF Dakshendra
Thanks for your reply, ineed to write that in visual emil template
Lokesh KumarLokesh Kumar
Hi Dakshendra,

Please try the below VF Template and let me know it worked or not.
 
<messaging:emailTemplate recipientType="User"
	relatedToType="Lead"
	subject="YOur Subject Line"
	language="{!recipient.language__c}"
	replyTo="support@acme.com">

	<messaging:htmlEmailBody>
		<html>
			<body>

			<p>Dear {!relatedTo.FirstName}},</p></br>
			<p>It was a pleasure spending time with you yesterday and today.</p></br>
			
			<p>At one, we enjoy contributing to the continued success of progressive companies like {!relatedTo.Account.Name}.
			I look forward to continuing our dialogues and will be in touch regarding our discussion.
			In the mean time, if you have any additional questions, please do not hesitate to contact me directly. </p> </br>
			
			Sincerely, </br>
				{!recipient.Name}  </br>
				{!recipient.Phone} </br>
				{!recipient.Email} </br>
		
			
			</body>
		</html>
	</messaging:htmlEmailBody>
</messaging:emailTemplate>

Thanks,
Lokesh
Lokesh KumarLokesh Kumar
And, Please follow the below Article from salesforce side.

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_email_templates_creating.htm

Thanks !
Lokesh