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