public class EmailMessage
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
EmailMessage() |
Modifier and Type | Method and Description |
---|---|
EmailMessage |
addSubstitutionsEntry(java.lang.String key,
java.util.List<java.lang.String> value)
Default message substitutions.
|
EmailMessage |
clearSubstitutionsEntries()
Removes all the entries added into Substitutions.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getBody()
The body of the email message.
|
java.lang.String |
getFeedbackForwardingAddress()
The email address that bounces and complaints will be forwarded to when
feedback forwarding is enabled.
|
java.lang.String |
getFromAddress()
The email address used to send the email from.
|
RawEmail |
getRawEmail()
An email represented as a raw MIME message.
|
java.util.List<java.lang.String> |
getReplyToAddresses()
The reply-to email address(es) for the email.
|
SimpleEmail |
getSimpleEmail()
An email composed of a subject, a text part and a html part.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getSubstitutions()
Default message substitutions.
|
int |
hashCode() |
void |
setBody(java.lang.String body)
The body of the email message.
|
void |
setFeedbackForwardingAddress(java.lang.String feedbackForwardingAddress)
The email address that bounces and complaints will be forwarded to when
feedback forwarding is enabled.
|
void |
setFromAddress(java.lang.String fromAddress)
The email address used to send the email from.
|
void |
setRawEmail(RawEmail rawEmail)
An email represented as a raw MIME message.
|
void |
setReplyToAddresses(java.util.Collection<java.lang.String> replyToAddresses)
The reply-to email address(es) for the email.
|
void |
setSimpleEmail(SimpleEmail simpleEmail)
An email composed of a subject, a text part and a html part.
|
void |
setSubstitutions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> substitutions)
Default message substitutions.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
EmailMessage |
withBody(java.lang.String body)
The body of the email message.
|
EmailMessage |
withFeedbackForwardingAddress(java.lang.String feedbackForwardingAddress)
The email address that bounces and complaints will be forwarded to when
feedback forwarding is enabled.
|
EmailMessage |
withFromAddress(java.lang.String fromAddress)
The email address used to send the email from.
|
EmailMessage |
withRawEmail(RawEmail rawEmail)
An email represented as a raw MIME message.
|
EmailMessage |
withReplyToAddresses(java.util.Collection<java.lang.String> replyToAddresses)
The reply-to email address(es) for the email.
|
EmailMessage |
withReplyToAddresses(java.lang.String... replyToAddresses)
The reply-to email address(es) for the email.
|
EmailMessage |
withSimpleEmail(SimpleEmail simpleEmail)
An email composed of a subject, a text part and a html part.
|
EmailMessage |
withSubstitutions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> substitutions)
Default message substitutions.
|
public java.lang.String getBody()
public void setBody(java.lang.String body)
body
- The body of the email message.public EmailMessage withBody(java.lang.String body)
Returns a reference to this object so that method calls can be chained together.
body
- The body of the email message.public java.lang.String getFeedbackForwardingAddress()
public void setFeedbackForwardingAddress(java.lang.String feedbackForwardingAddress)
feedbackForwardingAddress
- The email address that bounces and
complaints will be forwarded to when feedback forwarding is
enabled.public EmailMessage withFeedbackForwardingAddress(java.lang.String feedbackForwardingAddress)
Returns a reference to this object so that method calls can be chained together.
feedbackForwardingAddress
- The email address that bounces and
complaints will be forwarded to when feedback forwarding is
enabled.public java.lang.String getFromAddress()
public void setFromAddress(java.lang.String fromAddress)
fromAddress
- The email address used to send the email from.
Defaults to use FromAddress specified in the Email Channel.public EmailMessage withFromAddress(java.lang.String fromAddress)
Returns a reference to this object so that method calls can be chained together.
fromAddress
- The email address used to send the email from.
Defaults to use FromAddress specified in the Email Channel.public RawEmail getRawEmail()
public void setRawEmail(RawEmail rawEmail)
rawEmail
- An email represented as a raw MIME message.public EmailMessage withRawEmail(RawEmail rawEmail)
Returns a reference to this object so that method calls can be chained together.
rawEmail
- An email represented as a raw MIME message.public java.util.List<java.lang.String> getReplyToAddresses()
public void setReplyToAddresses(java.util.Collection<java.lang.String> replyToAddresses)
replyToAddresses
- The reply-to email address(es) for the email. If
the recipient replies to the email, each reply-to address will
receive the reply.public EmailMessage withReplyToAddresses(java.lang.String... replyToAddresses)
Returns a reference to this object so that method calls can be chained together.
replyToAddresses
- The reply-to email address(es) for the email. If
the recipient replies to the email, each reply-to address will
receive the reply.public EmailMessage withReplyToAddresses(java.util.Collection<java.lang.String> replyToAddresses)
Returns a reference to this object so that method calls can be chained together.
replyToAddresses
- The reply-to email address(es) for the email. If
the recipient replies to the email, each reply-to address will
receive the reply.public SimpleEmail getSimpleEmail()
public void setSimpleEmail(SimpleEmail simpleEmail)
simpleEmail
- An email composed of a subject, a text part and a html
part.public EmailMessage withSimpleEmail(SimpleEmail simpleEmail)
Returns a reference to this object so that method calls can be chained together.
simpleEmail
- An email composed of a subject, a text part and a html
part.public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getSubstitutions()
public void setSubstitutions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> substitutions)
substitutions
- Default message substitutions. Can be overridden by
individual address substitutions.public EmailMessage withSubstitutions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> substitutions)
Returns a reference to this object so that method calls can be chained together.
substitutions
- Default message substitutions. Can be overridden by
individual address substitutions.public EmailMessage addSubstitutionsEntry(java.lang.String key, java.util.List<java.lang.String> value)
The method adds a new key-value pair into Substitutions parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into Substitutions.value
- The corresponding value of the entry to be added into
Substitutions.public EmailMessage clearSubstitutionsEntries()
Returns a reference to this object so that method calls can be chained together.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.