Class Destination
- All Implemented Interfaces:
Serializable, Cloneable
Represents the destination of the message, consisting of To:, CC:, and BCC: fields.
By default, the string must be 7-bit ASCII. If the text must contain any
other characters, then you must use MIME encoded-word syntax (RFC 2047)
instead of a literal string. MIME encoded-word syntax uses the following
form: =?charset?encoding?encoded-text?=. For more information,
see RFC 2047.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for Destination object.Destination(List<String> toAddresses) Constructs a new Destination object. -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanThe BCC: field(s) of the message.The CC: field(s) of the message.The To: field(s) of the message.inthashCode()voidsetBccAddresses(Collection<String> bccAddresses) The BCC: field(s) of the message.voidsetCcAddresses(Collection<String> ccAddresses) The CC: field(s) of the message.voidsetToAddresses(Collection<String> toAddresses) The To: field(s) of the message.toString()Returns a string representation of this object; useful for testing and debugging.withBccAddresses(String... bccAddresses) The BCC: field(s) of the message.withBccAddresses(Collection<String> bccAddresses) The BCC: field(s) of the message.withCcAddresses(String... ccAddresses) The CC: field(s) of the message.withCcAddresses(Collection<String> ccAddresses) The CC: field(s) of the message.withToAddresses(String... toAddresses) The To: field(s) of the message.withToAddresses(Collection<String> toAddresses) The To: field(s) of the message.
-
Constructor Details
-
Destination
public Destination()Default constructor for Destination object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it. -
Destination
-
-
Method Details
-
getToAddresses
-
setToAddresses
The To: field(s) of the message.
- Parameters:
toAddresses- The To: field(s) of the message.
-
withToAddresses
The To: field(s) of the message.
NOTE: This method appends the values to the existing list (if any). Use
setToAddresses(java.util.Collection)orwithToAddresses(java.util.Collection)if you want to override the existing values.- Parameters:
toAddresses- The To: field(s) of the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withToAddresses
The To: field(s) of the message.
- Parameters:
toAddresses- The To: field(s) of the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getCcAddresses
-
setCcAddresses
The CC: field(s) of the message.
- Parameters:
ccAddresses- The CC: field(s) of the message.
-
withCcAddresses
The CC: field(s) of the message.
NOTE: This method appends the values to the existing list (if any). Use
setCcAddresses(java.util.Collection)orwithCcAddresses(java.util.Collection)if you want to override the existing values.- Parameters:
ccAddresses- The CC: field(s) of the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withCcAddresses
The CC: field(s) of the message.
- Parameters:
ccAddresses- The CC: field(s) of the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getBccAddresses
-
setBccAddresses
The BCC: field(s) of the message.
- Parameters:
bccAddresses- The BCC: field(s) of the message.
-
withBccAddresses
The BCC: field(s) of the message.
NOTE: This method appends the values to the existing list (if any). Use
setBccAddresses(java.util.Collection)orwithBccAddresses(java.util.Collection)if you want to override the existing values.- Parameters:
bccAddresses- The BCC: field(s) of the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withBccAddresses
The BCC: field(s) of the message.
- Parameters:
bccAddresses- The BCC: field(s) of the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
-
equals
-
hashCode
-
clone
-