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
JThomasJThomas 

sendEmail Apex call limitations

I recently noticed that calling sendEmail from Apex code is limited to a certain number daily.  For Enterprise edition it's 500 emails per day.  I would have thought that Enterprise edition should have been much higher than that.  I have no idea how close our organization is to bumping up against that limit.  Is there a way to find out how many emails have been sent using sendEmail from Apex code?

yashagarwalyashagarwal

I am working on a similar requirement and the single email message limit is 500 for the entreprise edition, 1000 for unlimited.

 

One of the ways to handle this is to talk to salesforce to increase your limit , they do that .

 

Another way this can be handled is use a custom setting/global static variable  to maintain a count. Now, in all apex codes , where ever you are using the send email , check this counter and update it. This way you would know when your are approaching thd limit and can write code to handle that.

 

I have personally not come across a non - coding way to handle this. Let me know if you find one.

 

Thanks



osamanosaman

Correct!

 

But the emails sent using the workflow alerts doesn't count towards this limit. We have handeled it using a custom object and setting workflow rule.

RadnipRadnip

Salesforce isn't really designed for mass emailing so we just send all emails via our email gateway that we use for sending out our newsletters.