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 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 multiple 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. Each ID counts against the sending organization's daily mass email limit.
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: