• Tapeshwar Kumar

Apex Exception Email

Apex Exception Email

Set the email addresses that receive notifications when your Apex code encounters unhandled exceptions. Emails can be sent to your Salesforce org’s users and to external email addresses.

How to enable

  1. Navigate to Setup

  2. Search Apex Exception Email in quick find box

  3. Click on add user or add External email address

  4. Click on Save

How to access Apex Exception Email in Apex Code

  • ApexEmailNotification

  • Query on this class to get Apex Email's User or email id

  • SELECT Id, Email, UserId FROM ApexEmailNotification