Setup Email Services

You can configure the Email Services to handle the inbound messages. Perform the following steps to manually set up Email Services:

  1. Click on the ‘Settings’ icon on the Salesforce navigation bar and then click on the ‘Setup’ button
  2. Select Email Services in one of the following ways:
    • Use the Search Setup/Quick Find search field, or
    • Select Platform Tools > Custom Code > Email Services
  3. Click on the ‘New Email Service’ button as shown in the image below:
New Email Services
  1. The following window will appear:
Setup new email service
  1. Enter ‘NotificationReplyService’ in the ‘Email Service Name’ field. This is a mandatory field.
  2. Enter ‘EmailToTextServiceHandler’ in the ‘Apex Class’ field. This is a mandatory field.
  3. Do not enter values in the ‘Accept Email From’ text box
  4. Click on the ‘Active’ checkbox to enable the email services
  5. Click on the ‘Save and New Email Address’ button. If the user gets the following error while creating an email service: 

Error: The Apex class selected is not valid. An apex class that implements the Messaging.InboundEmailHandler interface must be selected.

Follow the below additional steps to complete the configuration

  • Go to the ‘Setup’ page in the org
Go to the Setup
  • Search ‘Apex Classes’ in the quick find and open the page
  • Click on the ‘Compile all classes’ link and wait until it finishes compiling
Search Apex Classes
  • Once the compilation is complete, you will get the following message saying, ‘Compilation Complete’:
Complilation Complete Apex Classes
  1. Go to the email service page and now try to save the email service. The following window will appear:
Try to Save the Email Services
  1. Enter the name in the ‘Email Address Name’ field and click on the ‘Save’ button. The following window will appear:
Email Service NotificationReplyService
  1. Once you complete the email notification configuration as mentioned in the following ‘enable notification’ section by selecting the newly created email service address against the ‘Reply-To address’ field, upon receiving an incoming message, the system will send the email notification to the user assigned with Sender ID.
Enable Notificagtion on Email Service

When the ‘Send Email Notification From’ field is not configured, you will see the oAuth user email address as ‘From email ID’ and you will see the above created ‘Reply-To address’ in the ‘Reply-To’ email ID field in the email composer as shown below:

Message Recieved Notificaion
Reply Over Notification Email

Notes: The same email address will start reflecting for the ‘Reply-To Address’ field in the Default Notification settings as well as the Sender ID level notification settings. For more information about Email Services, see Defining Email Services

Was This Article Helpful?

Important Announcement!

URGENT! Please register the 10-digit business phone number (e.g. 555-555-5555) that your organization uses to send texts to consumers in the U.S. Failure to register may cause heavy penalties and disruption to all your text messaging communications.