Apex Email Limits Clarification

Edit: Having been questioned about the behavior, I just tested this and found that you can send as many emails as you can handle within governor limits. As a proof of concept, I wrote the following code:

Messaging.SingleEmailMessage[] messages = new Messaging.SingleEmailMessage[0];
for(integer i = 0; i < 10000; i++) {
    messaging.SingleEmailMessage m = new messaging.SingleEmailMessage();
    m.settargetobjectid(userinfo.getUserId());
    m.setsubject('hello'+i);
    m.setplaintextbody('world'+i);
    m.setsaveasactivity(false);
    messages.add(m);

}
messaging.sendemail(messages);
system.assert(false);

This code did not fail with any errors about too many emails in the list, heap limits, CPU limits, etc. So, as long as you don't break any other governor limits, you can theoretically send 25,000 in a single call (but, you'd likely run in to governor limits without going asynchronous).


You can send 100 SingleEmailMessage per sendEmail call, and 10 sendEmail calls per transaction. So, you can send 1000 per transaction. There's no limit for sending to portal and internal users using setTargetObjectId.

All of this information is found in the Governor Limits document in the Email Limits section (the link goes there directly).