O'Reilly logo

The Developer’s Guide to the Force.com Platform by Phil Choi, Andrew Fawcett, Glen Martin, Rick Greenwald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sending Email

To help your applications send emails, the Force Platform provides a comprehensive set of built-in classes and methods that allow you to send either basic text-based messages or rich HTML messages with attachments through the use of Apex code.

Basics of Sending Email

You do not need to be an expert to get started sending emails from your Apex code. The SendEmail Apex class has been uploaded into your organization as part of the chapter setup; the methods within it are referenced throughout this section.

Before running the following code samples in this section, open your preferred Apex code editor and modify the value of the EMAIL_ADDRESS static variable in the sendMail class, as shown in the following code. Your email address ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required