I have a batch job that emails contacts using a visualforce template. I am using SingleEmailMessage to email contacts as the template pulls data from each contact. my batch size is 10 and we have about 10k contacts. I noticed SINGLE_EMAIL_LIMIT_EXCEEDED in the logs and after some investigation, I figured out that there is a governor limit for outbound emails and it is 1000/day.

Trying find a solution for this but ran out of ideas. Would like to know If there is way to email all contacts from a batch job. would appreciate any help and below is the code I am using in the execute method.

EmailTemplate  template = [Select id,DeveloperName from EmailTemplate where name= 'UpdateInformation'];

        List < Messaging.SingleEmailMessage > msgList = new List < Messaging.SingleEmailMessage > ();

        for (Contact contact: (List < Contact > ) records) {
            Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();          
  • why don't you try WF email alert. – Tushar Sharma Jan 26 '16 at 5:29

As per the documentation you can send mass email to a maximum of 1,000 external email addresses per day per organization based on Greenwich Mean Time (GMT). The maximum number of external addresses you can include in each mass email depends on your edition

enter image description here


  • @Himasnshu, Thanks and That is what I read earlier I am looking for a solution If possible. – sdondeti Jan 25 '16 at 18:15
  • Use ExactTarget or Silverpop if you need more than 1000. – Himanshu Jan 25 '16 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.