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
slxdeveloperslxdeveloper 

email method limitations

Has anyone figured out a creative way to manage single email methods given the 10 message governor limit?  For example, If I have an email method set-up to send out a message upon an opportunity closing, then we can't update more than 10 opportunities at a time (single trigger execution) without hitting this limit.

 

Can't use built-in workflow/email alerts because the data for the email message is coming from more than 1 object and we need to have control over the to:, cc: fields.

 

Looking for any creative ideas here.

Best Answer chosen by Admin (Salesforce Developers) 
meerameera

You can user @future method call for sending emails. So it will increase the limit from 10 to 100.

 

You can have 10 @future calls in a single context and in each @future call you can send 10 emails. So in total you can update 100 opportunities.

All Answers

meerameera

You can user @future method call for sending emails. So it will increase the limit from 10 to 100.

 

You can have 10 @future calls in a single context and in each @future call you can send 10 emails. So in total you can update 100 opportunities.

This was selected as the best answer
slxdeveloperslxdeveloper
Thanks.  That sort of solved it for now.  I just chunk it in 10 message increments and send to the @future class.
Walter@AdicioWalter@Adicio

but if each email is unique with a different recipient. Does that mean I can only send 10 emails?

 

so if i need to send 200, the only option is to have the user click a button 20 times?