+ Start a Discussion

Email limit exceeded on batch apex

I have a batch job which sends email notification in bulk using Messaging.sendEmail() and its using setTargetObjectId to set the reciepient. It sends out thousands of emails but one day I got case saying emails are not received. Upon checking I see that there was an error "Email Limit Exceeded" for few emails. On that day it had sent some 19K emails successfully but for 9,000 + emails failed because of this error.
Please let me know if there is any limit to send email from batch class using Messaging.sendEmail().
AbhishekAbhishek (Salesforce Developers) 
If you're emailing contacts or leads, you're limited to how many you can send per day (currently 5,000). If you're emailing users, you can email as many as you want. Make sure you're using a User Id as the setTargetObjectId if this is the case.

For further reference this too (https://salesforce.stackexchange.com/questions/17133/single-email-limit-exceeded-salesforce-very-frequently/17140)

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.