Loading

SINGLE_EMAIL_LIMIT_EXCEEDED Error from Test class

Publiseringsdato: Jun 26, 2023
Beskrivelse
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.
Løsning
After 24 hours, limit will reset to zero  then you can run test classes again with out any error.
Knowledge-artikkelnummer

000381426

 
Laster
Salesforce Help | Article