---
schema_version: "1"
id: bb2c8c704f9821dfc72a1971075e8f8187f14f384ac4178aa68ce2c972bd589a
title: Create Visualforce Email Templates in Salesforce Classic
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/creating_visualforce_email_templates.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.creating_visualforce_email_templates.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f8e02bad8b224bfa7cbce9f158d6ddb3f3666c7f96c4af34939bd14395612df6
description: Use the Visualforce programming language to create targeted and personalized email content.
products:
  - Sales Cloud
  - Cross Cloud
  - Service Cloud Voice
release: "264"
---
# Create Visualforce Email Templates in Salesforce Classic

Use the Visualforce programming language to create targeted and personalized email content.

### 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: Salesforce Classic</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Available in: <strong>Group</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>,
                <strong>Unlimited</strong>, <strong>Developer</strong>, and <strong>Contact Manager</strong> Editions
              </p>
              <p style="margin-bottom:0;">Mass
                email not available in: <strong>Personal</strong>, <strong>Contact Manager</strong>, and <strong>Group</strong>
                Editions </p>
            </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="d46545e91">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d46545e91 ">To create or change Visualforce email templates:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d46545e91 ">Customize Application</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d46545e91 ">To create or change public email template folders:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d46545e91 ">Manage Public Classic Email Templates</td>

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

![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 If you’re using a free org, such as a Developer org, you can have up to 500 email templates, of any kind, in that org.

1. 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.
2. Click **New Template**.
3. Choose Visualforce and click **Next**.
4. Choose a folder in which to store the template.
5. To make the template available for use, select the **Available For Use** checkbox.
6. Enter an email template name.
7. 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.
8. If desired, choose a different character set from the Encoding dropdown list.
9. Enter a description for the template. Both template name and description are for your internal use only.
10. Enter a subject line for your template in Email Subject.
11. In the Recipient Type dropdown list, select the type of recipient to receive email created from the template.
12. If desired, in the Related To Type dropdown list, select the object from which the template retrieves merge field data.
13. Click **Save**.
14. On the View and Edit Email Templates in Salesforce Classic page, click **Edit Template**.
15. Enter markup text for your Visualforce email template.
    
    ![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 If you are including an image, we recommend uploading it to the Documents tab to reference the copy of the image on our server. For example:
    
    ```java
    <apex:image id="Logo" value="https://yourInstance.salesforce.com/servlet/servlet.ImageServer?
    id=015D0000000Dpwc&oid=00DD0000000FHaG&lastMod=127057656800" />
    ```
16. To specify the version of Visualforce and the API used with this email template, click **Version Settings**. If you’ve installed managed packages from AppExchange , you can also specify which version of each managed package to use with this email template. Generally, use the default value for all versions, to associate the email template with the most recent version of Visualforce, the API, and each managed package. To maintain specific behavior, you can specify an older version of Visualforce and the API. To access components or functionality that differ from the most recent package version, you can specify an older version of a managed package.
17. To view the details of the template, click **Save**. To continue editing your template, click **Quick Save**. Your Visualforce markup must be valid before you can save your template.
    
    ![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 maximum size of a Visualforce email template is 1 MB.
    
    You can't send a mass email using a Visualforce email template. The {!Receiving\_User.field\_name} and {!Sending\_User.field\_name} merge fields work only for mass email and list email and are unavailable in Visualforce email templates.

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**. If the email template includes encrypted data, remember that the data is displayed as encrypted within the generated email and in the Visualforce template page. For security reasons, it isn’t displayed in plain text.

To translate Visualforce email templates based on recipients’ or related objects’ languages, use the `<messaging:emailTemplate>` tag's `language` attribute (valid values: Salesforce supported language keys, for example, “en-US”). The language attribute accepts merge fields from the email template's `recipientType` and `relatedToType` attributes. You create custom language fields for use in the merge fields.

![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 Translation Workbench is required to translate email templates.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_productivity-264-0-0-production-enus/b2f6c36a-fa61-4a3c-9752-032ce1818a69/images/icon_important.png)

Important You can't send a mass email using a Visualforce email template.

#### See Also

- [Use Merge Fields for Visualforce Email Templates in Salesforce Classic](https://help.salesforce.com/s/articleView?id=sales.merge_fields_vf_email.htm&release=264.0.0&type=5 "A merge field is a field you can put in an email template, mail merge template, custom link, or formula to incorporate values from a record.")
- [Manage Version Settings for Visualforce Email Templates in Salesforce Classic](https://help.salesforce.com/s/articleView?id=sales.email_visualforce_version_settings.htm&release=264.0.0&type=5 "To aid backwards-compatibility, each Visualforce email template is saved with version settings for the specified version of Visualforce and the API. If the Visualforce email template references installed managed packages, the version settings for each managed package referenced by the Visualforce component are saved too. Saving version settings ensures that as Visualforce, the API, and the components in managed packages evolve in subsequent versions, a Visualforce email template is still bound to versions with specific, known behavior.")
- [Use Visualforce Email Templates with Guest Users](https://help.salesforce.com/s/articleView?id=sales.email_templates_vf_guest_users.htm&release=264.0.0&type=5 "Protect access to your company’s data when you send emails that use Visualforce Classic email templates to guest users. These templates can be used with Process Builder, Workflow Builder, and Apex calls.")
- [Modify a Visualforce Email Template for Guest Users](https://help.salesforce.com/s/articleView?id=sales.email_templates_vf_modify_for_guest.htm&release=264.0.0&type=5 "Protect access to your company’s data when you send emails that use Visualforce Classic email templates to guest users. These templates can be used with Process Builder, Workflow Builder, and Apex calls.")
- [Create HTML Classic Letterhead Email Templates in Salesforce Classic](https://help.salesforce.com/s/articleView?id=sales.creating_html_email_templates.htm&release=264.0.0&type=5 "You can create HTML-based email templates using Classic letterhead. You can’t change the layout in an existing template, but you can update the Classic letterhead associated with the template. To create a letterhead email template, you must have at least one active Classic letterhead.")
- [Create Custom HTML Email Templates in Salesforce Classic](https://help.salesforce.com/s/articleView?id=sales.creating_custom_html_email_templates.htm&release=264.0.0&type=5 "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.")
- [Create Text Email Templates in Salesforce Classic](https://help.salesforce.com/s/articleView?id=sales.creating_text_email_templates.htm&release=264.0.0&type=5 "You can create plain-text email templates to send to recipients who can’t read HTML email.")
- [_Developer's Guide:_ Visualforce Developer's Guide](https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/)