{"id":2280,"date":"2010-07-02T13:33:55","date_gmt":"2010-07-02T08:33:55","guid":{"rendered":"http:\/\/www.chiragmehta.info\/chirag\/?p=2280"},"modified":"2010-07-02T13:34:41","modified_gmt":"2010-07-02T08:34:41","slug":"messaging-singleemailmessage-array-and-sendemail-limits","status":"publish","type":"post","link":"https:\/\/www.chiragmehta.info\/chirag\/2010\/07\/02\/messaging-singleemailmessage-array-and-sendemail-limits\/","title":{"rendered":"Messaging.SingleEmailMessage array and sendEmail limits"},"content":{"rendered":"<p><strong>Problem Statement<\/strong><br \/>\nThe 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&#8217;m not using mass email.)<\/p>\n<p><strong>Solution <\/strong>(Ack : Anand)<br \/>\nThe limit is on the number of times &#8220;SendEmail(&#8230;)&#8221; 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) .<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem Statement 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[169],"class_list":["post-2280","post","type-post","status-publish","format-standard","hentry","category-salesforce","tag-salesforce","post-preview"],"_links":{"self":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/2280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/comments?post=2280"}],"version-history":[{"count":2,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/2280\/revisions"}],"predecessor-version":[{"id":2282,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/2280\/revisions\/2282"}],"wp:attachment":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/media?parent=2280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/categories?post=2280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/tags?post=2280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}