MassEmailMessage extends Email and inherits all of its methods. All base email (Email class) methods are also available to the MassEmailMessage objects.
The following are constructors for MassEmailMessage.
The following are methods for MassEmailMessage. All are instance methods. All base email (Email class) methods are also available to the MassEmailMessage objects. These methods are described in Email Class (Base Email Methods).
public Void setDescription(String description)
Type: Void
public Void setTargetObjectIds(ID[] targetObjectIds)
Type: Void
You can list up to 250 IDs per email. If you specify a value for the targetObjectIds field, optionally specify a whatId as well to set the email context to a user, contact, or lead. This ensures that merge fields in the template contain the correct data.
Do not specify the IDs of records that have the Email Opt Out option selected.
public Void setWhatIds(ID[] whatIds)
Type: Void
The values must be one of the following types:
If you specify whatIds, specify one for each targetObjectId; otherwise, you will receive an INVALID_ID_FIELD error.