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
RinkuSainiRinkuSaini 

SINGLE EMAIL LIMIT EXCEEDED Error

I have the issue SINGLE_EMAIL_LIMIT_EXCEEDED and after running this code from anonymous but have the same issue.
I am using setTargetObjectId then it not be count in the limit and mail send successfully.
But not working ??

Messaging.SingleEmailMessage emailMsg = new Messaging.SingleEmailMessage(); emailMsg.setTargetObjectId(contactid);
emailMSg.saveAsActivity = false; emailMsg.setSenderDisplayName('sender name'); emailMsg.setSubject('some subject'); emailMsg.setBccSender(false); emailMsg.setUseSignature(false); emailmsg.setPlainTextBody('email body'); Messaging.sendEmail(new Messaging.SingleEmailMessage[] { emailMsg })
Jakub Kołodziej 7Jakub Kołodziej 7
A SINGLE_EMAIL_LIMIT_EXCEEDED exception is thrown when the daily Messaging.SingleEmailMessage limit is exceeded. This exception can be thrown in other cases as well, like when email deliverability is not set correctly.

Each SingleEmailMessage sent counts toward the limit, even if it is sent to the same email address.

A Dev Edition org has a single email limit of 15 messages. (assuming 1 recipient per email)

The single email limits don't take unique addresses into account. For example, if you have johndoe@example.com in your email 10 times, that counts as 10 against the limit.

In Developer Edition organizations and organizations evaluating Salesforce during a trial period, your organization can send single emails to a maximum of 15 email addresses per day.

A non Dev org has a single email limit of 1000 messages. (assuming 1 recipient per email)

Using the API or Apex, you can send single emails to a maximum of 1,000 external email addresses per day based on Greenwich Mean Time (GMT).