Newer Version Available
MassEmailMessage Class
Namespace
Usage
MassEmailMessage extends Email and inherits all of its methods. All base email (Email class) methods are also available to the MassEmailMessage objects.
MassEmailMessage Methods
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).
setDescription(description)
Signature
public Void setDescription(String description)
Parameters
- description
- Type: String
Return Value
Type: Void
setTargetObjectIds(targetObjectIds)
Signature
public Void setTargetObjectIds(ID[] targetObjectIds)
Parameters
- targetObjectIds
- Type: ID[]
Return Value
Type: Void
Usage
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.
- toAddresses
- ccAddresses
- bccAddresses
- targetObjectId
setWhatIds(whatIds)
Signature
public Void setWhatIds(ID[] whatIds)
Parameters
- whatIds
- Type: ID[]
Return Value
Type: Void
Usage
The values must be one of the following types:
- Contract
- Case
- Opportunity
- Product