---
schema_version: "1"
id: b54c2ba21a866c7d0c7321069f931e1f759113907a550ccb022b566fa64ab243
title: Define Email Service Addresses
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/code_email_service_address.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.code_email_service_address.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ed75a3515b063f3507e9c5f8e79b05337b12dc5bc1c897c4da11b32b182f58eb
description: Add an inbound email address for an email service.
products:
  - Salesforce Platform
release: "264"
---
# Define Email Service Addresses

Add an inbound email address for an email service.

### 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: both Salesforce Classic and Lightning
              Experience</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Available in: <strong>Enterprise</strong>, <strong>Performance</strong>,
                <strong>Unlimited</strong>, and <strong>Developer</strong> Editions
              </p>
              <p style="margin-bottom:0;">Use of email services
                in installed AppExchange packages also available in:
                <strong>Essentials</strong>, <strong>Group</strong>, and <strong>Professional</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="d7120e83">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d7120e83 ">To configure Apex email services and email service addresses:</td>

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

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d7120e83 ">To create Apex classes:</td>

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

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

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/images/icon_tip.png)
    
    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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/images/icon_important.png)
    
    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.

#### See Also

- [What Are Email Services?](https://help.salesforce.com/s/articleView?id=platform.code_email_services_overview.htm&release=264.0.0&type=5 "Email services are automated processes that use Apex classes to process inbound email.")
- [Define Email Services](https://help.salesforce.com/s/articleView?id=platform.code_email_services_editing.htm&release=264.0.0&type=5 "Set up an email service to handle incoming email, and configure the service to process messages according to your users' needs.")
- [The InboundEmail Object](https://help.salesforce.com/s/articleView?id=platform.code_inbound_email.htm&release=264.0.0&type=5 "For every email the Apex email service domain receives, Salesforce creates a separate InboundEmail object that contains the contents and attachments of that email. You can use Apex classes that implement the Messaging.InboundEmailHandler interface to handle an inbound email message. Using the handleInboundEmail method in that class, you can access an InboundEmail object to retrieve the contents, headers, and attachments of inbound email messages, as well as perform many functions.")
- [Email Services](https://help.salesforce.com/s/articleView?id=platform.code_email_services.htm&release=264.0.0&type=5 "You can use email services to process the contents, headers, and attachments of inbound email. For example, you can create an email service that automatically creates contact records based on contact information in messages.")