How to check SingleEmail limit in Salesforce?

How to check SingleEmail limit in Salesforce?

Single Email Limit is subjected to emails sent via API or Apex. There’s no limit on sending single emails to contacts, leads, person accounts, and users in your org directly from account, contact, lead, opportunity, case, campaign, or custom object pages.

Reference Article:

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_apex_governor_limits.htm

System.OrgLimit can be used to check SingleEmail limit in Salesforce.

Sample Code:

Map < String,System.OrgLimit > limitsMap = OrgLimits.getMap();  
System.OrgLimit objSingleEmailLimit = limitsMap.get( 'SingleEmail' );  
System.debug( 'Limit Name: ' + objSingleEmailLimit.getName() );  
System.debug( 'Usage Value: ' + objSingleEmailLimit.getValue() );  
System.debug( 'Maximum Limit: ' + objSingleEmailLimit.getLimit() );  

Output:

Leave a Reply