How to set up email templates on Salesforce

intermediate 8 min read Updated 2026-03-18
Quick Answer

Set up email templates in Salesforce by navigating to Setup > Email Templates, selecting a template type, and customizing the content with merge fields. You can create text, HTML, or Lightning templates for automated communications.

Prerequisites

  • Active Salesforce org with admin or marketing user permissions
  • Understanding of Salesforce Lightning Experience interface
  • Basic knowledge of HTML for advanced template customization
  • Access to email template creation permissions

Step-by-Step Instructions

1

Access Email Templates in Setup

Click the Setup gear icon in the top-right corner of your Salesforce org. In the Quick Find box, type Email Templates and select Email Templates from the results. This will take you to the email template management page.
Bookmark the Email Templates page for quick access if you plan to create multiple templates.
2

Create a New Email Template

Click the New Template button on the Email Templates page. Choose your template type:
  • Text - Plain text emails
  • HTML - Rich formatted emails
  • Custom (without using Classic Letterhead) - Full HTML control
  • Lightning - Modern responsive templates
Select your preferred type and click Next.
Lightning templates are recommended for modern, mobile-responsive designs.
3

Configure Template Properties

Fill out the required template information:
  • Template Name - Internal name for identification
  • Description - Brief explanation of template purpose
  • Folder - Choose or create a folder for organization
  • Available For Use - Check to make template active
For Lightning templates, select the Email Template Type (Lead, Contact, User, etc.) to determine available merge fields.
Use descriptive names and organize templates in folders by department or purpose.
4

Design the Email Subject Line

In the Subject field, enter your email subject line. Use merge fields to personalize the subject by clicking the Insert Field button and selecting relevant fields like {!Contact.FirstName} or {!Account.Name}. Example: Welcome {!Contact.FirstName} - Your Account Setup is Complete
Keep subject lines under 50 characters and test merge fields with actual data to ensure they display correctly.
5

Create the Email Body Content

In the email body editor, create your template content:
  • For HTML templates: Use the rich text editor or switch to HTML Source for custom code
  • Add merge fields using Insert Field button
  • Include dynamic content like {!Contact.FirstName}, {!Account.Name}, or {!Case.CaseNumber}
  • For Lightning templates: Use the drag-and-drop builder with pre-designed components
Always include an unsubscribe link and your company's contact information to comply with email regulations.
6

Add Attachments and Advanced Settings

Configure additional template settings:
  • Attachments - Click Attach File to add documents or images
  • Enhanced Letterhead - Select a letterhead if using HTML templates
  • Encoding - Choose character encoding (usually UTF-8)
  • Delivery Options - Set up tracking and delivery preferences
Keep attachments under 25MB total and use web-hosted images when possible to reduce email size.
7

Preview and Test the Template

Before saving, preview your template by clicking Preview. Select a test record to see how merge fields populate with real data. Check the preview in both desktop and mobile views. Make any necessary adjustments to formatting, merge fields, or content.
Send test emails to yourself and colleagues to verify formatting appears correctly across different email clients.
8

Save and Activate the Template

Once satisfied with your template, click Save to create it. Ensure the Available For Use checkbox is selected to make the template accessible to users. Set appropriate folder permissions to control who can view and use the template within your organization.
Create template usage guidelines and train your team on when and how to use each template effectively.

Common Issues & Troubleshooting

Merge fields are not displaying data correctly

Verify the merge field syntax is correct (e.g., {!Contact.FirstName}) and ensure the field exists on the target object. Check that the template type matches the record type you're sending from.

Users cannot see or access the email template

Check the folder permissions for the email template. Go to Setup > Email Templates, find your template folder, and verify that the appropriate user profiles have Read access to the folder.

Images are not displaying in email template

Upload images to Salesforce Documents or Files and use the generated public URL. Alternatively, host images externally and ensure URLs are accessible. Avoid using relative image paths.

Template formatting looks different when sent vs. preview

Email clients interpret HTML differently. Test your templates across multiple email clients (Outlook, Gmail, Apple Mail). Use inline CSS instead of external stylesheets and avoid complex CSS properties that may not be supported.

Prices mentioned in this guide are pulled from current plan data and may change. Always verify on the official Salesforce website before purchasing.