Sending Email

The three ways to send email in Apex are the following:

Image SingleEmailMessageSends an email to up to ten receivers. The email addresses of receivers are provided as strings. A string containing HTML or plain text is used as the message body.

Image SingleEmailMessage with template—Sends to up to ten receivers, but the unique identifiers of Contact, Lead, or User objects must be used instead of strings to provide the receivers’ email addresses. The message body is constructed from a template. Templates are globally available to an organization ...

Get Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.