com.amazonaws.services.simpleemail.model
Class Body

java.lang.Object
  extended by com.amazonaws.services.simpleemail.model.Body

public class Body
extends Object

Represents the body of the message. You can specify text, HTML, or both. If you use both, then the message should display correctly in the widest variety of email clients.


Constructor Summary
Body()
          Default constructor for a new Body object.
Body(Content text)
          Constructs a new Body object.
 
Method Summary
 boolean equals(Object obj)
           
 Content getHtml()
          The content of the message, in HTML format.
 Content getText()
          The content of the message, in text format.
 int hashCode()
           
 void setHtml(Content html)
          The content of the message, in HTML format.
 void setText(Content text)
          The content of the message, in text format.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 Body withHtml(Content html)
          The content of the message, in HTML format.
 Body withText(Content text)
          The content of the message, in text format.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Body

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


Body

public Body(Content text)
Constructs a new Body object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
text - The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).
Method Detail

getText

public Content getText()
The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).

Returns:
The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).

setText

public void setText(Content text)
The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).

Parameters:
text - The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).

withText

public Body withText(Content text)
The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).

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

Parameters:
text - The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).
Returns:
A reference to this updated object so that method calls can be chained together.

getHtml

public Content getHtml()
The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.

Returns:
The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.

setHtml

public void setHtml(Content html)
The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.

Parameters:
html - The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.

withHtml

public Body withHtml(Content html)
The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.

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

Parameters:
html - The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.
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.