Loading

Recreate Inbound Routing and Service Addresses to Fix "Is Not a Valid Address" Errors

Udgivelsesdato: Sep 22, 2026
Beskrivelse

When setting up an Email-to-Case routing address or an Apex Email Service address in Salesforce, it's a best practice to type the values directly into the fields rather than copy and paste them from other sources, such as a Word document or email.

Copying and pasting from formatted sources can introduce hidden characters that cause inbound emails to these addresses to bounce with errors, even though case creation and email processing otherwise work as expected.

Løsning

This article explains why "is not a valid address" bounce errors occur on Email-to-Case routing addresses and Apex Email Service addresses, and how to recreate these addresses cleanly for Email2Apex, Email2Case, and Email2Salesforce.

Why This Happens

Because Salesforce stores configuration data in an XML-based format internally, content copied from sources with extra spaces, line breaks, or HTML formatting can embed hidden characters in the backend tables. These hidden characters are parsed by backend code but are not visible in the setup UI.

For Email-to-Case specifically, emails sent to a routing or service address can bounce with errors such as 'badaddress@185tpneup8unr1zgmcf530kspwcxe2fx3b9q1kp8ohzxmoxyci.xx-9xxxxxxxxx.naXX.case.salesforce.com is not a valid address', and cases are not created because the emails aren't accepted at that address. Similar errors can also occur for Apex Email Service addresses that contain hidden characters.

If copy and paste is the only option when supplying values in routing address setup, paste from a low-level text editor such as Notepad, TextPad, or Notepad++ instead of pasting directly from a formatted source.

Recreate an Email2Apex Address

  1. Go to Setup | Custom Code | Email Services.
  2. Find the existing service address and review it to see what options are set up so you can configure the new one the same way.
  3. Select New and populate the following: Email Service Name (a name for your service), Apex Class (the name of your Apex class), and select the Active checkbox.
  4. Select "Save and New Address".
  5. On the next screen, give the address a name, empty the "Accept Email From" box, and select Save.
  6. You can now use the new email service address that's supplied. This is the address you forward emails to for processing.

Recreate an Email2Case Routing Address

  1. Go to Setup | Service | Email-to-Case.
  2. Find the existing routing address and review it to see what options are set up so you can configure the new one the same way.
  3. Carefully note down all the attributes, since the existing routing address needs to be deleted.
  4. Delete the routing address.
  5. Select New (routing address) and populate the Routing Name, the Email Address (same as the deleted routing address — type it in rather than copy and paste), and the other attributes you reviewed above.
  6. Select Save.
  7. Make sure this address is "Verified" for full Email-to-Case functionality.
  8. Note the email service address associated with the new routing address — this is the address you forward emails to for processing.

Recreate an Email2Salesforce Address

For Email-to-Salesforce, no manual address creation is needed — addresses are generated automatically on the backend.

  1. Obtain the domain name of your Email-to-Salesforce address from the Email to Salesforce section of your Email Settings, and copy the domain name.
  2. Log into Workbench, Developer Console, or another tool and run this SOQL query: select id from emailservicesaddress where emaildomainname = 'yourdomainname'.
  3. In Workbench, on the query result, click the ID in the ID field. On the panel that appears, click Delete and confirm you want to delete that record.
  4. Return to the Salesforce app and go to Personal Settings | Email | My Email to Salesforce. A new Email to Salesforce address is generated and displayed immediately, and is available for use right away.
  5. If you stored your previous Email-to-Salesforce address in your contact list, update those addresses with the new one.
Vidensartikelnummer

000393407

 
Indlæser
Salesforce Help | Article