+ Start a Discussion
dmchengdmcheng 

Messaging.SingleEmailMessage array and sendEmail limits?

Hello.  The Apex Developers Guide says there is a maximum of 10 sendEmail methods per transaction (page 310).  Is this counted by individual message sent, or by line of code executed?  Example: What if you have 11 messages in a Messaging.SingleEmailMessage array and call the sendEmail method once using this array?

 

(Each message in the array has slightly different content, which is why I'm not using mass email.)

 

Thanks

David

Best Answer chosen by Admin (Salesforce Developers) 
Anand@SAASAnand@SAAS

The limit is on the number of times "SendEmail(...)" method is called not the number of SingleEmailMessage int he Array. So theoretically you can send 10 x 1000 emails (assuming you have an array of 1000 SingleEmailMessage for every sendEmail call) .

All Answers

Anand@SAASAnand@SAAS

The limit is on the number of times "SendEmail(...)" method is called not the number of SingleEmailMessage int he Array. So theoretically you can send 10 x 1000 emails (assuming you have an array of 1000 SingleEmailMessage for every sendEmail call) .

This was selected as the best answer
andhra123andhra123
Hi Anand, Is 1000 the limit on maximum number of SingleEmailMessages for one sendEmail call. I would like to send 2000 emails at once using one sendEmail call. i.e my SingleEmailMessage arrary will contain 2000 emails. is it possible?? Thanks!!!!