Loading

SINGLE_EMAIL_LIMIT_EXCEEDED Error from Apex Test Class in Salesforce

게시 일자: Jun 3, 2026
상세 설명

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:

  1. Attempt to send 15 or more test emails from an Apex class in a developer org.
  2. After reaching the daily single email governor limit, run an Apex test class that calls a method which sends emails.
  3. The test class returns the SINGLE_EMAIL_LIMIT_EXCEEDED error.
솔루션

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.

Why This Happens

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.

Resolution

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.

Knowledge 기사 번호

000381426

 
로드 중
Salesforce Help | Article