In Salesforce, when the daily single email message limit for an org is reached, any Apex test class that invokes an email-sending method produces a System.EmailException with the following error:
System.EmailException: SendEmail failed. First exception on row X; first error: SINGLE_EMAIL_LIMIT_EXCEEDED, Email limit exceeded
Steps to Reproduce:
Salesforce enforces a daily governor limit on the total number of single emails that can be sent from an org. Once this limit is reached, any Apex test class that triggers an email send throws a SINGLE_EMAIL_LIMIT_EXCEEDED exception. This is expected behavior and is not a platform defect.
The SINGLE_EMAIL_LIMIT_EXCEEDED error surfaces from both direct email sends and from test classes that invoke code containing email-sending logic. Even if the test itself is not intended to send emails to real recipients, the governor limit counts are shared across the entire org.
Wait 24 hours for the daily single email limit to reset automatically. Once the limit resets to zero, Apex test classes that trigger email methods will execute without error.
No Salesforce Support case is required unless the limit continues to cause disruption after the 24-hour reset period.
000381426

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.