---
schema_version: "1"
id: 5f557926cb61bf39b07135aa77e986448d6081fef9d868b7a1457b818edbe642
title: Modify a Visualforce Email Template for Guest Users
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/email_templates_vf_modify_for_guest.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.email_templates_vf_modify_for_guest.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2e948a21bbf186822786c55ce58d126b9871451765c03492ea312263badbd246
description: 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.
products:
  - Sales Cloud
  - Cross Cloud
  - Service Cloud Voice
release: "264"
---
# Modify a Visualforce Email Template for Guest Users

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.

### 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 and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Essentials</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="d72257e75">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d72257e75 ">To create or change Classic Visualforce email templates:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d72257e75 ">Author Apex</td>

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

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

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

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

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

In Summer ‘20, Salesforce introduced a security policy that affects Visualforce email templates used to send emails to guest users in Experience Cloud sites.

![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 Classic Visualforce email templates must be edited in Salesforce Classic, but they can be used in Lightning Experience with Process Builder, Workflow Builder, and Apex calls.

Modify each Visualforce email template so that emails are sent correctly to all users, including guest users.

1. Add the Author Apex user permission.
    1. From Setup, enter Profiles in the **Quick Find** box, then select **Profiles**.
    2. Edit an existing profile or create one.
    3. In the **Administrative Permissions** section, select Author Apex.
2. Edit a Visualforce email template.
    1. In Setup, enter Classic in the **Quick Find** box, then select **Classic Email Templates**.
    2. Click the name of a Visualforce type template.
    3. Click **Edit Template**.
    4. Add the system context attribute to the emailTemplate tag:
        
        ```
        renderUsingSystemContextWithoutSharing="True"
        ```
        
        ![Warning](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_productivity-264-0-0-production-enus/b2f6c36a-fa61-4a3c-9752-032ce1818a69/images/icon_warning.png)
        
        Warning 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.
    5. Click **Save**.

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

Example

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

#### See Also

- [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.")