0

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().

0

There is standard 5000 emails limit applied for emails sent through the API(SingleEmailMessage).

Pls see the documentation for more details - https://help.salesforce.com/articleView?id=000323568&language=en_US&type=1&mode=1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.