New error codes have been added related to sending email messages and rendering email templates, and one error code has been changed.
These error codes can be returned by sendEmail().
- Emails to one or more recipients have bounced. Check email addresses to make sure they are valid.
- A single email message was sent with the REJECT setting in the optOutPolicy field to recipients that have opted out from receiving email. To avoid this error, set the optOutPolicy field to another value.
These error codes can be returned by the new renderEmailTemplate() call or by sendEmail().
- The email template is invalid and can’t be rendered. Check the template for incorrectly specified merge fields.
- You don’t have access to one or more merge fields in this template. Contact your Salesforce administrator to request access.
- One or more merge fields don’t exist. Check the spelling of field names.
- One or more merge fields have no value. Update the records before sending the email to provide values.
- The merge fields in this email template can’t be processed. Ensure that your template body is valid.
Changed Error Codes
- The error message now contains the IDs of the records that couldn’t be locked, when available.