As per the documentation re governor limits, you can only actually call the sendEmail
method of the Messaging
class 10 times.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm
You are receiving this message because you will have called it 11 times in the same context. Depending on your use case, there are a couple of ways to circumnavigate this. If you really do need to call the sendEmail
method more than 10 times, you could use a Batch Apex class and set your batch size to 1 (to 10 depending how you implement it). This would allow you to call the method 10 times per execute iteration. See this blog entry for details:
http://forceguru.blogspot.co.uk/2011/03/how-to-send-more-than-10-e-mails.html
Its not clear from your post whether that is what you want to do, but you can also send the same email to multiple addresses using the following format:
setToAddresses( new String[] {address1, address2, address3} )
Or, different emails to different addresses using something like:
List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
// add mails to list here
Messaging.sendEmail( mails );
See the documentation here:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_outbound.htm
Messaging.sendEmailMessage
takes a list. It's usually possible to assemble multiple emails, but send them all in one invocation.