---
schema_version: "1"
id: 91908554a0905c351d7d7f1bd4c666a28d9c6d7f0303144f3f6af045bcc5b017
title: Set Up Email Relay
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/email_relay.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.email_relay.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 00e41831979e41417e510572638192c9f0c6d69cb694efdb5a3e963e48f5750c
description: You can set up an email relay for Salesforce-generated email by configuring Salesforce to automatically route email through your company’s Simple Mail Transfer Protocol (SMTP) server. If your company sends email from more than one email domain, you can configure an email relay for each domain.
products:
  - Sales Cloud
  - Cross Cloud
  - Service Cloud Voice
release: "264"
---
# Set Up Email Relay

You can set up an email relay for Salesforce-generated email by configuring Salesforce to automatically route email through your company’s Simple Mail Transfer Protocol (SMTP) server. If your company sends email from more than one email domain, you can configure an email relay for each domain.

### 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>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="d86958e76">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d86958e76 ">To configure email relay:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d86958e76 ">Email Administration, Customize Application, and View Setup </td>

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

If you plan to activate bounce management and email compliance management, confirm with your email admin that your company allows relaying email sent from Salesforce.

1. From Setup, in the Quick Find box, enter Email Relays, and select **Email Relays**.
2. Select **Create Email Relay**.
3. For Host, enter a mail domain, hostname or IP address.
    
    If you provide a name, Salesforce checks for valid Domain Name Service (DNS) mail exchange (MX) records first. If none are found, we look for a DNS Address (A) record. If you plan to use Transport Layer Security (TLS) with this connection, enter the hostname instead of the IP address. TLS requires the hostname for verifying certificates.
    
    Here are examples of valid formats.
    
    - Mail domain: `myemaildomain.com`
    - Mail server hostname: `mail.myemaildomain.com`
    - IP address: `100.121.20.5`
4. For Port, enter the number of your company’s SMTP server.
    
    Obtain this information from your email administrator. Email relaying is supported on port numbers 25, 587, 10025, and 11025.
5. Select a TLS Setting. This setting controls whether Salesforce uses TLS for SMTP sessions.
    
    - Off—TLS is turned off. SMTP session continues through an insecure connection.
    - Preferred—If the remote server supports TLS, Salesforce upgrades the current SMTP session to use TLS. If TLS is unavailable, Salesforce continues the session without TLS. This setting is the default.
    - Required—Salesforce continues the session only if the remote server supports TLS. If TLS is unavailable, Salesforce terminates the session without delivering the email.
    - Preferred Verify—If the remote server supports TLS, Salesforce upgrades the current SMTP session to use TLS. Before the session begins, Salesforce verifies that a valid certificate authority has signed the certificate and that the common name presented in the certificate matches the domain or mail exchange of the current connection. If TLS is available but the certificate isn’t signed or the common name doesn’t match, Salesforce disconnects the session and doesn’t deliver the email. If TLS is unavailable, Salesforce continues the session without TLS.
    - Required Verify— Salesforce continues the session only if the remote server supports TLS, a valid certificate authority has signed the certificate, and the common name presented in the certificate matches the domain or mail exchange to which Salesforce is connected. If any of these criteria aren’t met, Salesforce terminates the session without delivering the email.
    
    If you use TLS verification, an MX or an A record for your hostname is required in Public DNS. Canonical Name (CNAME) DNS records can’t be used for relays with TLS verification.
6. Optionally, to enable authentication with a username and password for this email relay.
    
    1. Select **Enable SMTP Auth**.
        
        When you enable this setting, the TLS Setting changes to the required value, Required Verify.
    2. In the Auth Type field, select a Simple Authentication and Security Layer (SASL) mechanism to use for SMTP authentication.
        
        - To use the `PLAIN` SASL mechanism, select **Auth Plain**. This is the default Auth Type when you enable SMTP Auth.
        - To use the `LOGIN` SASL mechanism, select **Auth Login**.
        
        Salesforce supports only the `PLAIN` and `LOGIN` SASL mechanisms.
    3. For Username, enter the username for SMTP authentication.
    4. For Password, enter the password for SMTP authentication.
    5. In the Confirm Password field, reenter the password for SMTP authentication.
    
    Before you enable SMTP authentication, test this feature in a sandbox to ensure that it works as expected with your email relay. Some email services don’t support SMTP authentication for email relays.
    
    If you deselect **Enable SMTP Auth**, Salesforce saves your authentication credentials but doesn’t route email to your company’s email server using SMTP authentication.
7. Save your changes.
8. [Set up an email domain filter](https://help.salesforce.com/s/articleView?id=xcloud.emailadmin_email_domain_filter.htm&type=5&language=en_US). You must set up an email domain filter for email relay to work.

Salesforce recommends that you send a test message each time you change the email relay configuration.

If you set up multiple email relays in one org, they’re processed in the priority order of their email domain filters. By default, email domain filters are evaluated in the order that they were created. To change the evaluation order, use the PriorityNumber field on the EmailDomainFilter object SOAP API. If no matching rule for email relay is found, then the email is sent via the Salesforce Mail servers.

#### See Also

- [Test the Deliverability of Emails Sent Through Salesforce](https://help.salesforce.com/s/articleView?id=sales.security_test_email_delivery.htm&release=264.0.0&type=5 "When a user sends an email through Salesforce, the email is routed through one of a number of possible Salesforce IP addresses. If the email’s recipient blocks any of these IP addresses, the email might not be received. It’s hard to test whether your customers are receiving emails from all possible Salesforce IP addresses. However, using the Test Deliverability feature, you can easily send an email to yourself from each of the potential Salesforce IP addresses. If you receive all emails, then you aren’t blocking any of the Salesforce IP addresses.")
- [Enabling Compliance BCC Emails](https://help.salesforce.com/s/articleView?id=sales.admin_compliancebcc.htm&release=264.0.0&type=5 "If your organization evaluates all outbound email messages for compliance, you can enable compliance BCC emails.")
- [_SOAP API Developer Guide_: EmailDomainFilter](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_emaildomainfilter.htm#sforce_api_objects_EmailDomainFilter)
- [_Knowledge Article_: Salesforce 'Email Relay' with Office 365](https://help.salesforce.com/articleView?id=000387487&type=1&mode=1&language=en_US)