Loading

Salesforce Error 'NO_MASS_MAIL_PERMISSION' on Email Sent via Apex Trigger

Publicatiedatum: May 4, 2026
Beschrijving

You receive an error when sending email through a Salesforce Apex Trigger in a recently refreshed sandbox.
Note: The default deliverability setting in a refreshed sandbox is set to 'System email only.' This is the most common cause of the NO_MASS_MAIL_PERMISSION error in sandbox environments. Confirm your deliverability setting before investigating other causes.
You receive the following error when sending email through an Apex Trigger:
"System.EmailException: SendEmail failed. First exception on row 0; first error: NO_MASS_MAIL_PERMISSION,"

  • Single email is not enabled for your organization or profile.
  • Single email must be enabled for you to use this feature: []

The Apex Trigger is executed by a User with a System Administrator profile, and both Mass Mail and Single Mail are enabled for the profile.

Oplossing

This error occurs when Salesforce cannot send email through an Apex Trigger because the organization's email deliverability settings or profile permissions are not correctly configured. Review the common causes below and apply the appropriate fix.

Common Causes

  • Trial account restriction: Trial accounts cannot send mass emails. You must purchase a Salesforce license to go live with your organization.
  • Missing permission: You are missing a permission and must log a case with Salesforce Support to enable 'Respect SendEmail API' and 'SendEmail API.' For more information, see Enable a feature or limit that is not listed.
  • Deliverability set to System email only: The email access level is set to 'System email only.' This is the default setting in a refreshed sandbox and blocks Apex Trigger emails from being sent.

Checking and Updating Deliverability Settings

To check and correct the Deliverability setting:
In Lightning Experience: Gear icon > Setup > ADMINISTRATION > Email > Deliverability. Verify the access level is set to All Emails.
In Salesforce Classic: Setup > Administer > Email Administration > Deliverability. Verify the access level is set to All Emails.
For more information on Deliverability settings, see the Deliverability Guidelines Help page.

Knowledge-artikelnummer

000384750

 
Wordt geladen
Salesforce Help | Article