Is there any way to retrieve the MessageId of emails sent from Salesforce.

This is so that I can match replies received to such emails using the inReplyTo field of the Messaging.InBoundEmail record in an inbound email service handler.

1 Answer 1


Go to Setup > Administration Setup > Monitoring > Email Log Files. Then request for email logs for the duration you want. Salesforce will generate a CSV file with all emails. You can find MessageId in one of the columns.

  • 1
    Hi, thanks for that. I was looking for a way to programmatically access this value. Also, there doesn't seem to be any way to tie the Email Log entry back to the Activity History record. Thanks anyway.
    – joe
    Jun 16, 2015 at 11:03
  • @Joe If it helps you, can you please mark it as answer.
    – Saroj Bera
    Jun 16, 2015 at 11:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .