com.amazonaws.services.simpleemail.model
Class SendEmailRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.simpleemail.model.SendEmailRequest

public class SendEmailRequest
extends AmazonWebServiceRequest

Container for the parameters to the SendEmail operation.

Composes an email message based on input data, and then immediately queues the message for sending.

IMPORTANT:If you have not yet requested production access to Amazon SES, then you will only be able to send email to and from verified email addresses and domains. For more information, go to the Amazon SES Developer Guide.

The total size of the message cannot exceed 10 MB.

Amazon SES has a limit on the total number of recipients per message: The combined number of To:, CC: and BCC: email addresses cannot exceed 50. If you need to send an email message to a larger audience, you can divide your recipient list into groups of 50 or fewer, and then call Amazon SES repeatedly to send the message to each group.

For every message that you send, the total number of recipients (To:, CC: and BCC:) is counted against your sending quota - the maximum number of emails you can send in a 24-hour period. For information about your sending quota, go to the "Managing Your Sending Activity" section of the Amazon SES Developer Guide .

See Also:
AmazonSimpleEmailService.sendEmail(SendEmailRequest)

Constructor Summary
SendEmailRequest()
          Default constructor for a new SendEmailRequest object.
SendEmailRequest(String source, Destination destination, Message message)
          Constructs a new SendEmailRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 Destination getDestination()
          The destination for this email, composed of To:, CC:, and BCC: fields.
 Message getMessage()
          The message to be sent.
 List<String> getReplyToAddresses()
          The reply-to email address(es) for the message.
 String getReturnPath()
          The email address to which bounce notifications are to be forwarded.
 String getSource()
          The identity's email address.
 int hashCode()
           
 void setDestination(Destination destination)
          The destination for this email, composed of To:, CC:, and BCC: fields.
 void setMessage(Message message)
          The message to be sent.
 void setReplyToAddresses(Collection<String> replyToAddresses)
          The reply-to email address(es) for the message.
 void setReturnPath(String returnPath)
          The email address to which bounce notifications are to be forwarded.
 void setSource(String source)
          The identity's email address.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 SendEmailRequest withDestination(Destination destination)
          The destination for this email, composed of To:, CC:, and BCC: fields.
 SendEmailRequest withMessage(Message message)
          The message to be sent.
 SendEmailRequest withReplyToAddresses(Collection<String> replyToAddresses)
          The reply-to email address(es) for the message.
 SendEmailRequest withReplyToAddresses(String... replyToAddresses)
          The reply-to email address(es) for the message.
 SendEmailRequest withReturnPath(String returnPath)
          The email address to which bounce notifications are to be forwarded.
 SendEmailRequest withSource(String source)
          The identity's email address.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SendEmailRequest

public SendEmailRequest()
Default constructor for a new SendEmailRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


SendEmailRequest

public SendEmailRequest(String source,
                        Destination destination,
                        Message message)
Constructs a new SendEmailRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
source - The identity's email address.
destination - The destination for this email, composed of To:, CC:, and BCC: fields.
message - The message to be sent.
Method Detail

getSource

public String getSource()
The identity's email address.

Returns:
The identity's email address.

setSource

public void setSource(String source)
The identity's email address.

Parameters:
source - The identity's email address.

withSource

public SendEmailRequest withSource(String source)
The identity's email address.

Returns a reference to this object so that method calls can be chained together.

Parameters:
source - The identity's email address.
Returns:
A reference to this updated object so that method calls can be chained together.

getDestination

public Destination getDestination()
The destination for this email, composed of To:, CC:, and BCC: fields.

Returns:
The destination for this email, composed of To:, CC:, and BCC: fields.

setDestination

public void setDestination(Destination destination)
The destination for this email, composed of To:, CC:, and BCC: fields.

Parameters:
destination - The destination for this email, composed of To:, CC:, and BCC: fields.

withDestination

public SendEmailRequest withDestination(Destination destination)
The destination for this email, composed of To:, CC:, and BCC: fields.

Returns a reference to this object so that method calls can be chained together.

Parameters:
destination - The destination for this email, composed of To:, CC:, and BCC: fields.
Returns:
A reference to this updated object so that method calls can be chained together.

getMessage

public Message getMessage()
The message to be sent.

Returns:
The message to be sent.

setMessage

public void setMessage(Message message)
The message to be sent.

Parameters:
message - The message to be sent.

withMessage

public SendEmailRequest withMessage(Message message)
The message to be sent.

Returns a reference to this object so that method calls can be chained together.

Parameters:
message - The message to be sent.
Returns:
A reference to this updated object so that method calls can be chained together.

getReplyToAddresses

public List<String> getReplyToAddresses()
The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.

Returns:
The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.

setReplyToAddresses

public void setReplyToAddresses(Collection<String> replyToAddresses)
The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.

Parameters:
replyToAddresses - The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.

withReplyToAddresses

public SendEmailRequest withReplyToAddresses(String... replyToAddresses)
The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.

Returns a reference to this object so that method calls can be chained together.

Parameters:
replyToAddresses - The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.
Returns:
A reference to this updated object so that method calls can be chained together.

withReplyToAddresses

public SendEmailRequest withReplyToAddresses(Collection<String> replyToAddresses)
The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.

Returns a reference to this object so that method calls can be chained together.

Parameters:
replyToAddresses - The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.
Returns:
A reference to this updated object so that method calls can be chained together.

getReturnPath

public String getReturnPath()
The email address to which bounce notifications are to be forwarded. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by the ReturnPath parameter.

Returns:
The email address to which bounce notifications are to be forwarded. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by the ReturnPath parameter.

setReturnPath

public void setReturnPath(String returnPath)
The email address to which bounce notifications are to be forwarded. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by the ReturnPath parameter.

Parameters:
returnPath - The email address to which bounce notifications are to be forwarded. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by the ReturnPath parameter.

withReturnPath

public SendEmailRequest withReturnPath(String returnPath)
The email address to which bounce notifications are to be forwarded. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by the ReturnPath parameter.

Returns a reference to this object so that method calls can be chained together.

Parameters:
returnPath - The email address to which bounce notifications are to be forwarded. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by the ReturnPath parameter.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.