+ Start a Discussion
Raghu Madaan 6Raghu Madaan 6 

Email Limit on SingleEmailObject using Apex

Hi,

I am trying to test out the email limit for Developer and Enterprise edition on SingleEmailObject using Apex Code. I have followed these guidlines for email limit : https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm

Here they have mentioned that if sending email using "setTargetObjectId" is not going to be counted for internal users. When i try to test it i made requests multiple times to send out the email. For the 1 developer edition account total of 23 emails came and for other developer edition account 27 emails came. After that i am not getting any exception from Apex code. No SINGLE_EMAIL_LIMIT_EXCEPTION . but  the emails are also not coming.

I have also tried the same for Enterprise ORG and got 14 emails only. After that no exception and no email either.

Does anyone knows any of the facts that weather there is any 1 hour milit or something like that?

Bhawani SharmaBhawani Sharma
I don't think so f there is any hourly limit. Please check your junk folder once.
Raghu Madaan 6Raghu Madaan 6
Nothing in the Junk Folder.
Pramod_SFDCPramod_SFDC
Hi,

You can use Limit methods to check, if you are hitting the limit or not

>> https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_limits.htm

Regards
Pramod
Raghu Madaan 6Raghu Madaan 6
Thanks for your reply Pramod. But i think the Limit Class can only provide me how many times i have called sendMail and how many more times i can call him. It doesn't gave me how many emails have been left to send as a daily limit.
Bhawani SharmaBhawani Sharma
​Allowed - Used = How Many left.
Raghu Madaan 6Raghu Madaan 6
Hi Bhawani..There is no method provided by the Limits class to get to know how much emails i have sent and how many are provided. The 2 methods getLimitEmailInvocations() and getEmailInvocations() only provides the how many times i can call sendMail method in a single request.