public class Body
extends java.lang.Object
implements java.io.Serializable
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 and Description |
---|
Body()
Default constructor for Body object.
|
Body(Content text)
Constructs a new Body object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.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.
|
java.lang.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.
|
public Body()
public Body(Content text)
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).
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).
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).
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).
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).
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.
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).
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.
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.
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.
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.
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.
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.
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.