Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

SendEmailResult Class

Contains the result of sending an email message.

Namespace

Messaging

Usage

Sending an email by using Apex requires domain-level and user-level email verification. System-generated emails also require verification of the From email address. Email delivery fails if any of these verifications is incomplete. See Requirements to Send Email from Salesforce.

Important

SendEmailResult Methods

The following are methods for SendEmailResult. All are instance methods.

getErrors()

If an error occurred during the sendEmail method, a SendEmailError object is returned.

Signature

public SendEmailError[] getErrors()

Return Value

Type: Messaging.SendEmailError[]

isSuccess()

Indicates whether the email was successfully submitted for delivery (true) or not (false). Even if isSuccess is true, it does not mean the intended recipients received the email, as there could have been a problem with the email address or it could have bounced or been blocked by a spam blocker.

Signature

public Boolean isSuccess()

Return Value

Type: Boolean