+ Start a Discussion
KrishSinghKrishSingh 

How to solve error Too many Email Invocations: 11

I am facing this problem, I have my custom apex code from where i am sending emails. I am facing "Too many Email Invocations: 11" error, can any one tell me about this.

 

krish

Ankit AroraAnkit Arora

Krish,

 

Please see this : http://forceguru.blogspot.com/2011/03/how-to-send-more-than-10-e-mails.html

 

Hope this will help you...

 

 

Thanks
Ankit Arora

 

KrishSinghKrishSingh

You mean i need to write a batch class for it???

Ankit AroraAnkit Arora

I hope yes. Also if you can share your code here, we can assist you in better way.

 

 

Thanks
Ankit Arora

 

Starpond SoftwareStarpond Software

Set a counter in your apex batch file that counts email invokes within your batch.

 

Every time you invoke an email in the batch,  then increase counter by 1

 

If you hit 10 you must stop emailing from within the batch

 

Apex batch jobs are only allowed to send 10 emails max.  

Prem Ranjan 45Prem Ranjan 45
You need to make list of Messaging.sendemail and add the mails to this list and then at last you need to send the mail by calling list of Messaging,sendemail outside the for loop.