How to Find and Make Sense of Salesforce Email Logs

Salesforce.com Email LogIt is critical to be aware of Salesforce Governor Limits.  Hitting a limit can stop your business processes.  If your processes rely on email, how do you monitor the 1,000 emails per day Governor Limit?  In this post I’ll introduce the Email Log Files, where  you get a detailed breakdown of the emails sent by your Salesforce org. Salesforce can send email in a variety of ways, from using Workflow Rules, to Apex code, or mass email. You can even configure your Salesforce org to receive emails for tracking purposes. To find a detailed breakdown of your org’s emails, you go to the Email Logs: Setup > Monitor > Logs > Email Log Files

email1

Select Request an Email Log. You can generate a log for any 7 day period in the last 30 days. You have the option of restricting the log to a specified list of addresses. Once requested, your pending request is listed. You can add your email address so you get a notification when it is ready. Typically the log is generated within a few minutes.

email2 Here is my request waiting in the queue: email4-queued

The resulting log is a zipped csv file that looks like this: excel

This is quite useful information: * Date Time * Recipient * Sender * Remote Host * Salesforce.com User ID Note that there are 2 lines for many individual emails, like these 2:

excel-dupes From the Salesforce.com documentation, the Mail Event indicates the final email event in the mail server with these possible values: Screen Shot 2013-12-31 at 7.13.59 PM

Notice that we have Reception and Delivery for many emails. Be aware that you may need to sort by Message ID and Mail Event when getting metrics from this file. The client’s logs I reviewed was using email extensively in their business process. They have projects that they track through about 10 Stages. Each Stage alerts a group of employees to take an action via email. Business was going so well that they blew through the 1000 email per day limit.  Suddenly, those critical email alerts disappeared.  If this happens to you, and the volume can’t be reduced, Salesforce may up your monthly email limit to 2000 if you ask nicely. The email log is like an access panel down in the basement plumbing of your Salesforce org.  Rarely used, but absolutely critical when you need it.  The steps above give you the email metrics you need if your business depends on a large volume of emails. Based on this you can made your decision as to how to control email flow in your business.

[tagline_box backgroundcolor=”#eaeaea” shadow=”yes” shadowopacity=”0.1″ border=”1px” bordercolor=”” highlightposition=”top” link=”https://opfocus.com/contact-us” linktarget=”_self” buttoncolor=”blue” button=”Contact Us” title=”Still need help with this? OpFocus is happy to help.” animation_type=”slide” animation_direction=”left” animation_speed=”.8″][/tagline_box]