官术网_书友最值得收藏!

Monitoring email logs

There's another debug log we should be aware of—the email log. This is required when we want to debug emails sent from Salesforce.

We won't cover the entire email log configuration, but there is something that we sometimes forget to configure when dealing with emails and sandbox organizations: email deliverability.

This simple configuration tells Salesforce which kind of email you want to send from your organization (it works in production organizations as well).

Go to Setup | Email | Deliverability:

Email deliverability setting

You can set the deliverability to any of the following options:

  • No access: No email will ever be sent from Salesforce.
  • System email only: Only system emails will be sent, such as sharing calculations or Apex error notifications.
  • All email: Every kind of email will pass through the Salesforce email servers.
When refreshing a sandbox, this setting is automatically set to System email only, so as to avoid unwanted automations being executed after you have set up your testing environment.
While creating a trial organization (when starting a new Salesforce project for a customer, you start from a trial, which is then promoted to the definitive production organization), this setting cannot be edited, and its default setting is System email only . If this happens, don't panic—just raise a case with Salesforce Support.

Now that you are sure that the emails are sent, go to Setup | Environments | Logs | Email Log Files, and you will see the following page:

Email Logs page

You can request email logs up to 30 days in the past with no more than 7 days per request. Once you request an email log with the only available button on the interface, choose the correct time frame, set up the domain names or email address for the recipients (if needed), and wait for Salesforce to notify you when the ZIP file is ready.

The ZIP contains a CSV with all the emails sent in the given time frame, which you can use to find out whether emails are not being sent, and for what reason. No body or subject is placed in this CSV, just information pertaining to deliverability.

For more details on how these logs are shaped, refer to Salesforce Help at https://help.salesforce.com/articleView?id=email_logs_format.htm&type=5.
主站蜘蛛池模板: 法库县| 万载县| 香格里拉县| 涿州市| 临汾市| 天全县| 泰和县| 铅山县| 石景山区| 奉节县| 张北县| 镇赉县| 湟源县| 错那县| 宜州市| 内黄县| 山东省| 朔州市| 定结县| 凌源市| 四子王旗| 西丰县| 南部县| 南昌市| 偏关县| 邛崃市| 花莲县| 浮梁县| 罗定市| 林西县| 栖霞市| 丹阳市| 江安县| 宁明县| 桓台县| 许昌县| 深州市| 高尔夫| 白水县| 石渠县| 武强县|