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,"
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.
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.
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.
000384750

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.