You are here:
Create Custom HTML Email Templates in Salesforce Classic
You can create custom HTML email templates without using Classic Letterhead. If you don’t know HTML, you can paste HTML code into your template.
Required Editions
| User Permissions Needed | |
|---|---|
| To create or change custom HTML email templates: | Edit HTML Templates |
| To create or change public email template folders: | Manage Public Classic Email Templates |
Note If you’re using a free org, you can have up to 500
email templates, of any kind, in that org.
HTML email templates can be used, but not created, in Lightning Experience.
-
Choose one of these options.
- If you have permission to edit public templates, from Setup, enter Email Templates in the Quick Find box, then select Classic Email Templates.
- If you don’t have permission to edit public templates, go to your personal settings. Enter Templates in the Quick Find box, then select Email Templates or My Templates—whichever one appears.
- Click New Template.
- Choose Custom (without using Classic Letterhead) and click Next.
- Choose a folder in which to store the template.
- To make the template available for use, select the Available For Use checkbox.
- Enter an email template name.
- If necessary, change the Template Unique Name. This unique name refers to the component when you use the Lightning Platform API. In managed packages, this unique name prevents naming conflicts in package installations. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. With the Template Unique Name field, you can change certain components’ names in a managed package and the changes are reflected in a subscriber’s organization.
- If desired, choose a different character set from the Encoding dropdown list.
- Enter a description for the template. Both the template name and the description are for your internal use only. The description is used as the title of any email activities you log when sending mass email.
- Enter a subject for the message.
- Click Next.
-
Enter the HTML source text for the message. Include all the HTML tags.
Note If you are including an image, we recommend uploading it to the Documents tab. Then you can reference the copy of the image on our server. For example:<img src="https://yourInstance.salesforce.com/servlet/servlet.ImageServer? id=015D0000000Dpwc&oid=00DD0000000FHaG&lastMod=1270576568000"/> - If desired, enter merge fields in the template subject and body. When you send an email, these fields are replaced with information from your lead, contact, account, opportunity, case, or solution.
- Click Next.
-
If desired, enter the text-only version of your email or click Copy text
from HTML version to automatically paste the text from your HTML version
without the HTML tags. The text-only version is available to recipients who can’t view
HTML emails.
Warning We recommend that you leave the text-only version blank. If you leave it blank, Salesforce automatically creates the text-only content based on the current HTML version. If you enter content manually, subsequent edits to the HTML version aren't reflected in the text-only version. When left blank, the text-only content is automatically created when sending an email via the UI. If you use that same template to send email via the API or APEX, you must provide the text-only content. Remember to update text-only content when you change the HTML content. - Click Save.
Tip View a sample of the template populated with data from records you choose and
send a test email by clicking Send Test and Verify Merge
Fields.
Note You can’t modify the content of a custom HTML template when you use it in an
email.
Did this article solve your issue?
Let us know so we can improve!

