I am sending one email to two address abc@outlook.com and abc1@outlook.com and both the address are on TO section. for both the address email 2case has been setup. Salesforce is creating two cases. Is there any way to track the email address for which the case got created.


Let's say, Email-to-Case set up is like this:


And user is sending single email to both the address bc@outlook.com and abc1@outlook.com.

So, there are 2 cases will be created and you if see any one of the Email messages, you will find To Address as bc@outlook.com;abc1@outlook.com

Though for both the Email Messages Parent Ids are different.

I could find querying Headers from EmailMessage

SELECT Id,ToAddress, ParentId, Headers FROM EmailMessage WHERE Id = '02s7A000008rq3L'

In the Header, search for X-SFDC-Original-RCPT, it shows that particular email address which has been mentioned as Email Services Address for which this case is getting created.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.