Class RawMessage

java.lang.Object
com.amazonaws.services.simpleemail.model.RawMessage
All Implemented Interfaces:
Serializable, Cloneable

public class RawMessage extends Object implements Serializable, Cloneable

Represents the raw data of the message.

See Also:
  • Constructor Details

    • RawMessage

      public RawMessage()
      Default constructor for RawMessage object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • RawMessage

      public RawMessage(ByteBuffer data)
      Constructs a new RawMessage object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      data - The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).

      The To:, CC:, and BCC: headers in the raw message can contain a group list.

      If you are using SendRawEmail with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for SendRawEmail.

      Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.

      For more information, go to the Amazon SES Developer Guide.

  • Method Details

    • setData

      public void setData(ByteBuffer data)

      The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).

      The To:, CC:, and BCC: headers in the raw message can contain a group list.

      If you are using SendRawEmail with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for SendRawEmail.

      Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.

      For more information, go to the Amazon SES Developer Guide.

      AWS SDK for Java performs a Base64 encoding on this field before sending this request to AWS service by default. Users of the SDK should not perform Base64 encoding on this field.

      Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.

      Parameters:
      data - The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).

      The To:, CC:, and BCC: headers in the raw message can contain a group list.

      If you are using SendRawEmail with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for SendRawEmail.

      Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.

      For more information, go to the Amazon SES Developer Guide.

    • getData

      public ByteBuffer getData()

      The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).

      The To:, CC:, and BCC: headers in the raw message can contain a group list.

      If you are using SendRawEmail with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for SendRawEmail.

      Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.

      For more information, go to the Amazon SES Developer Guide.

      ByteBuffers are stateful. Calling their get methods changes their position. We recommend using ByteBuffer.asReadOnlyBuffer() to create a read-only view of the buffer with an independent position, and calling get methods on this rather than directly on the returned ByteBuffer. Doing so will ensure that anyone else using the ByteBuffer will not be affected by changes to the position .

      Returns:
      The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).

      The To:, CC:, and BCC: headers in the raw message can contain a group list.

      If you are using SendRawEmail with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for SendRawEmail.

      Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.

      For more information, go to the Amazon SES Developer Guide.

    • withData

      public RawMessage withData(ByteBuffer data)

      The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).

      The To:, CC:, and BCC: headers in the raw message can contain a group list.

      If you are using SendRawEmail with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for SendRawEmail.

      Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.

      For more information, go to the Amazon SES Developer Guide.

      Parameters:
      data - The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).

      The To:, CC:, and BCC: headers in the raw message can contain a group list.

      If you are using SendRawEmail with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for SendRawEmail.

      Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.

      For more information, go to the Amazon SES Developer Guide.

      Returns:
      Returns a reference to this 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:
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public RawMessage clone()
      Overrides:
      clone in class Object