---
schema_version: "1"
id: 37fba49ddb557fa8e0a4c7639ae65a302cdfdedc8e76f2e7acaf6839ca78d279
title: Use Merge Fields for 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/merge_fields_vf_email.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.merge_fields_vf_email.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4d274cc3cd6393fe1bff16fa60fa9b0ce775ffc6c358ce78b07d563ef5ac70a3
description: 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.
products:
  - Sales Cloud
  - Cross Cloud
  - Service Cloud Voice
release: "264"
---
# Use Merge Fields for Visualforce Email Templates in Salesforce Classic

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.

### 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="d104509e89">User Permissions
            Needed</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d104509e89 ">To set version settings for Visualforce email templates:</td>

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

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

## Syntax and Formatting

Merge fields for Visualforce email templates use the same expression language as formulas:

```
{!Object_Name.Field_Name}
```

For example, you can start your email template with `Hello, {!Contact.FirstName}`. When you send the template, each recipient sees their first name in place of the merge field. If your recipient’s first name is John, he sees Hello, John! when he opens the email.

## Tips

- You can’t send a mass email using a Visualforce email template. `{!Receiving_User.field_name}` and `{!Sending_User.field_name}` are used for mass email and aren’t available for Visualforce email templates.
- To translate Visualforce email templates based on recipients’ or related objects’ languages, use the `<messaging:emailTemplate>` tag’s language attribute. Valid values are Salesforce-[supported language keys](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_translations.htm#translation_languages), such as “en-us” for English (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. The Translation Workbench is required to translate email templates.
- When `renderUsingSystemContextWithoutSharing="True"`, the email template runs in system mode, which bypasses user permissions, field-level security, and organization-wide defaults. Be careful when using this setting so that you don't inadvertently expose sensitive data. Before using this setting, assess the impact of the guest security policy and, if necessary, update the Visualforce email templates instead.
- Because the merge field Case Thread Token is supported in Lightning Experience only, you can’t use it in a Visualforce email template.

#### See Also

- [Create Visualforce Email Templates in Salesforce Classic](https://help.salesforce.com/s/articleView?id=sales.creating_visualforce_email_templates.htm&release=264.0.0&type=5 "Use the Visualforce programming language to create targeted and personalized email content.")
- [Developer's Guide: Visualforce Developer's Guide](https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/)