Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More
Enhance Salesforce with Code
Define Email Service Addresses

Define Email Service Addresses

Add an inbound email address for an email service.

Required Editions

Available in: both Salesforce Classic and Lightning Experience

Available in: Enterprise, Performance, Unlimited, and Developer Editions

Use of email services in installed AppExchange packages also available in: Essentials, Group, and Professional Editions

User Permissions Needed
To configure Apex email services and email service addresses: Customize Application
To create Apex classes: Author Apex
  1. From Setup, enter Email Services in the Quick Find box, then select Email Services.
  2. Choose the email service for which you want to define an address.
  3. Click New Email Address, or click Edit to change the configuration for an existing email service address. To delete an email service address, click View and Delete.
  4. In the Email Address field, enter the local-part of the email service address. Salesforce generates a unique domain-part for each email service address to ensure that no two email service addresses are identical. The generated domain-part appears to the right of the Email Address field.
    Tip
    Tip For the local-part of a Salesforce email address, all alphanumeric characters are valid, plus the following special characters: !#$%&'*/=?^_+-`{|}~. For the domain-part of a Salesforce email address, only alphanumeric characters are valid, as well as hyphen (-). The dot character (.) is also valid in both the local-part and domain-part as long as it is not the first or last character.

    Salesforce email addresses are case-insensitive.

  5. Select the Active checkbox if you want the email service address to be activated when you click Save.
  6. Choose the Context User. The email service assumes the permissions of the context user when processing the messages this address receives. For example, if the email service is configured to modify contact records upon receiving updated contact information, the email service only modifies a record if the context user has permission to edit the record.
    Important
    Important Choose a context user that has permission to execute the Apex class that the email service is configured to use.
  7. Optionally, configure this email service address to only accept messages from certain senders by listing their email addresses and domains in the Accept Email From text box. Separate multiple entries with commas. For example: george@mycompany.com, yahoo.com, gmail.com. If the Accept Email From text box has a value and the email service receives a message from an unlisted email address or domain, the email service performs the action specified in the Unauthorized Sender Action failure response setting.

    Leave this field blank if you want the email service to receive email from any email address.

    If both the email service and email service address are configured to only accept messages from certain senders, the email service only processes messages from senders that are listed in the Accept Email From text boxes on both the email service and the email service address.

  8. Click Save to save your changes, or Save and New to define another inbound email address for this email service.
 
Loading
Salesforce Help | Article