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
rcravenrcraven 

Messaging.sendEmail - Does this always count against a org's mass email limits?

I'm trying to determine all the senarios where sending email via Apex counts against a SF Organization's mass email govener limits?

 

The Apex Reference Documentation (PDF), pg. 341:

 

  • Single email messages sent with the sendEmail method count against the sending organization's daily single email limit.  When this limit is reached, calls to the sendEmail method using SingleEmailMessage are rejected, and the user receives a SINGLE_EMAIL_LIMIT_EXCEEDED error code. However, single emails sent through the application are allowed.

The Apex Reference Documentation (PDF), pg. 192-193:

 

  • Outbound Email: Limits for Single and Mass Email Sent Using Apex..  You can send single emails to a maximum of 1,000 external email addresses per day based on Greenwich Mean Time.  You can send an unlimited amount of email to your internal users.

 

Are there any instances where using Messaging.sendEmail does NOT count against a Organization's mass email limits?

 

Shashikant SharmaShashikant Sharma

It will get counted every time if you send mail using using Messaging.sendEmail , only time limit does not get count when you send email by application.

rcravenrcraven

Hum...What about setTagertObjectId = Salesforce User Id?   So these emails count against mass email limits too?

 

The use cases we need to resolve are as follows:

- We need to create a button feature that allows a user to add a comment, change owner, and status in one step.

- We don't want to rely on users (training of users) for ownership change notifications.

- Any Case/CaseComment Related Apex Trigger that fires After Update or After Insert distroys Case Settings - Contact Notifications (checkbox to notify contact on case creation, update, and resolve).  That's right, they no longer work, and the work-around that was provided by Salesforce Support is that we roll our own notify contact checkbox, because the standard "Notify Contact" field is not avalaible via the API.

 

If that is truely the case the Messaging.sendEmail feature itself is just useless in most use cases.   How could you rely on a solution that is tied to 1000 emails per day.  

 

So, our only option then is to hack a workflow rule notification based on object related field updates?  Any suggestions?