Loading

Recreate error free inbound routing addresses

Julkaisupäivä: Nov 21, 2024
Kuvaus
When creating Email to Case and Email Service address it is a best practice to type in the fields rather than use copy and paste from other sources.
Ratkaisu
The xml nature of Salesforce can embed hidden characters in the back end tables if content is copied from sources with space, line breaks, html etc.  The characters can be parsed by backend code but not seen in the GUI.  

Specifically for Email to Case: emails to routing or service addresses emails can bounce with errors such as 'badaddress@185tpneup8unr1zgmcf530kspwcxe2fx3b9q1kp8ohzxmoxyci.xx-9xxxxxxxxx.naXX.case.salesforce.com is not a valid address'  and cases will not be created as emails are not accepted to the specific address

Similar errors as above can also be seen for Apex Email Service addresses that have hidden characters.

If copying and pasting is the only option when supplying values in routing address setup use a paste from a low level text editor such as notepad, textpad, notepad++ etc.

Below are methods to create/recreate various types of inbound email addresses:

Email2Apex
  1. Go to Setup | Custom Code | Email Services
  2. Find the existing service address and review it to see what options you have set up so you can set the new one up similarly
  3. Hit New and populate the following:
  4. Email Service Name: nameForYourService
  5. Apex Class: nameOfYourApexClass
  6. Select the Active checkbox
  7. Hit ‘Save and New Address’
  8. On the next screen  give the address a name and empty the ‘Accept Email From’ box  and select Save
  9. You can now use the given email service address supplied. 
  10. This is the new email address you will forward emails to in order to be processed


Email2Case
  1. Go to Setup | Service | Email-to-Case
  2. Find the existing routing address and review it to see what options you have set up so you can set the new one up similarly
  3. Carefully note down all the attributes, as the existing routing address needs to be deleted.
  4. Delete the routing address.
  5. Hit New (routing address) and populate the following:
  6. Routing Name
  7. Email Address (same as the deleted routing address). Note: as above cut and paste is not advised.
  8. Other attributes reviewed in step 2
  9. Hit Save
  10. Remember to ensure this address is "Verified" for full email to case functionality.
  11. Note the email service address associated with the new routing address
  12. This is the new email address you will forward emails to in order to be processed

Email2Salesforce

For email to Salesforce user interaction at creation is not needed as addresses are automatically create on the backend
  1. Obtain the domain name of your email-to-salesforce address by going to the Email to Salesforce section of your Email Settings.
  2. Copy the domain name to your clipboard.
  3. Log into your Workbench/Dev Console or other and perform a SOQL query as follows:
  4. select id from emailservicesaddress where emaildomainname = ‘yourdomainname'
  5. Using Workbench on the query result, click ID in the ID field. On the panel that appears, click Delete and confirm that you want to delete that record.
  6. Return to the Salesforce app and access Personal Settings | Email | My  Email to Salesforce.  On accessing this Setup note a new Email to Salesforce address is generated and displayed on the page. This address is available for use, immediately.
  7.  Note: If you stored your previous email-to-salesforce address(es) in your contact list, ensure that you update those addresses with the new address.
Knowledge-artikkelin numero

000393407

 
Ladataan
Salesforce Help | Article