Loading

SINGLE_EMAIL_LIMIT_EXCEEDED Error from Test class

Date de publication: Jun 26, 2023
Description
If you have reached your  daily single email message limit for your org  , 
after reaching governor limit if you try to run test class ,then you will see the below error from the test class.
System.EmailException: SendEmail failed. First exception on row X; 
first error: SINGLE_EMAIL_LIMIT_EXCEEDED, Email limit exceeded

Steps to Reproduce:
=>Try to send 20 test emails from apex class in your developer org 
=>After sending 15 emails , you will receive SINGLE_EMAIL_LIMIT_EXCEEDED error.
=>Now, after getting the above error, try to run test class which in turn calls the method which sends emails.
=>Then You will receive error from Test Class.
Résolution
After 24 hours, limit will reset to zero  then you can run test classes again with out any error.
Numéro d’article de la base de connaissances

000381426

 
Chargement
Salesforce Help | Article