function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ria SharmaRia Sharma 

SINGLE_EMAIL_LIMIT_EXCEEDED, Email limit exceeded Error in batch class

So I wrote one batch class and it is working fine in sandbox and sending emails to contacts but it is not sending emails in production. It sent couple of emails 2 days back but after that when I tried to excute this, it is giving me error :
15:53:37:722 FATAL_ERROR System.EmailException: SendEmail failed. First exception on row 297; first error: SINGLE_EMAIL_LIMIT_EXCEEDED, Email limit exceeded: []

How come it is working in sandbox? I am so confused as cannot find any way to fix it. I tried to download email logs and it saya 5000 email were sent today so if limit is 1000 emails per day how come 5000 emails went out? Also in sanbox, it is 1500 emails showing up in email logs so this means I am not hitting 1000 emails per day limit?

Can someone help?
@Karanraj@Karanraj
The daily limit for emails sent through email alerts is 1,000 per standard Salesforce license per org. Which means Number of user licenses multiplied by 1,000. if you have 5 salesforce license then your org daily email limit is 5000.
Ria SharmaRia Sharma
@karanrajs...You are right so that cannot be the issue becuase we have more than 800 licenses and threfore limit will be 800,000 emails per day. Then what can be the problem if this logic is working fine in sandbox? Am I missing anything?
IntegrationGuyIntegrationGuy
Did you get clearification ?