---
schema_version: "1"
id: 1f8fd742d3c9825b785fc70e68c7bdd1e63ee892c874d3d1ccdb13ae1b3bb697
title: Convert a Lightning Email Template from SML to HML
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/email_template_convert_from_sml_to_hml.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.email_template_convert_from_sml_to_hml.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 91f17f3cd8e9f75cad8d0b9b45be545f399b8bddfff9f6c393b3286e9f06bf75
description: Take advantage of the Handlebars Merge Language (HML), which is more flexible than the Salesforce Merge Language (SML), by converting existing Lightning email templates.
products:
  - Sales Cloud
  - Cross Cloud
  - Service Cloud Voice
release: "264"
---
# Convert a Lightning Email Template from SML to HML

Take advantage of the Handlebars Merge Language (HML), which is more flexible than the Salesforce Merge Language (SML), by converting existing Lightning email templates.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Essentials</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d23261e79">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d23261e79 ">To create email templates: </td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d23261e79 ">Lightning Experience User</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d23261e79 ">To update email templates:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d23261e79 ">Modify All Data or template ownership</td>

          </tr>
        </tbody>
      </table>

All Lightning email templates created before Summer ‘18 are SML email templates, even if they don’t have any SML merge fields. All Lightning email templates created in Summer ‘18 and later are HML email templates, even if they don’t have any HML merge fields.

You have several choices.

- If the email template doesn’t have any merge fields, it’s converted to an HML email template when you save it.
- You can continue to use Classic email templates and Lightning email templates created with SML merge fields. You can update and save these email templates without having to remove SML merge fields.
- If you want to enter additional SML fields, do so manually.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_productivity-264-0-0-production-enus/b2f6c36a-fa61-4a3c-9752-032ce1818a69/images/icon_note.png)
    
    Note The merge picker shows HML fields only.
- If you add SML merge fields to an HML email template, you can’t save the template until the SML merge fields are removed.
    
    In the email composer, you can preview and send an email using an HML email template with SML merge fields. However, the HML merge fields appear as text, not as merged data from Salesforce.
- If you modify an email template so that it has HML merge fields only, and no SML merge fields, it’s converted to an HML email template when you save it.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_productivity-264-0-0-production-enus/b2f6c36a-fa61-4a3c-9752-032ce1818a69/images/icon_note.png)
    
    Note HML email templates can't be converted to SML email templates.

To convert Classic email templates to HML email templates:

1. Open the Classic email template.
2. Copy and paste the content into a new Lightning email template. You can use either the Email Templates page or the email composer.
3. Remove existing SML merge fields or replace them with equivalent HML merge fields.
4. Click **Save**.

#### See Also

- [Use the Handlebars Merge Language in Lightning Email Templates, Enhanced Letterhead, and Email Template Builder](https://help.salesforce.com/s/articleView?id=sales.handlebars_template_language.htm&release=264.0.0&type=5 "Use the Handlebars Merge Language—available in Summer ‘18—to add dynamic content to your Lightning and Email Template Builder email templates.")