Print this page

The Email to Salesforce parsing sequence to match emails to records in Salesforce

Knowledge Article Number 000206100
Description Inbound emails for Email to Salesforce are parsed in a certain order.  In order to match the emails to Contacts, Leads and Opportunities the parser looks for email addresses in the "from:", "to:", and  "cc:" lines in different areas of and email.

Resolution 1.  Firstly the email headers are checked. if they do not contain any addresses other than the sender and the Email to Salesforce email address the text version of the email is checked.
2.  If no email addresses can be extracted from the plain text email body the HTML version of the email is checked. In checking the plain text version of the email failures can happen if: 
  • There is no plain text email body.
  • The plain text email body does not contain "from:", "to:", "cc:" etc. (unlikely scenario).
  • The email addresses in the plain text email body cannot be parsed for some reason due to encoding or other. 
3.  The final check is the HTML body part. This could fail if the HTML is formatted in such a way that "\nfrom:", "\nto:", etc. don't exist or is not created using standard conventions.

If all checks fail the email will not be associated with a Contact, Lead or Opportunity and will go into the "Unresolved items"

promote demote