Class Body
- All Implemented Interfaces:
Serializable
,Cloneable
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
getHtml()
The content of the message, in HTML format.getText()
The content of the message, in text format.int
hashCode()
void
The content of the message, in HTML format.void
The content of the message, in text format.toString()
Returns a string representation of this object; useful for testing and debugging.The content of the message, in HTML format.The content of the message, in text format.
-
Constructor Details
-
Body
public Body()Default constructor for Body object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it. -
Body
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 Details
-
setText
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).
-
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).
-
withText
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).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setHtml
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.
-
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.
-
withHtml
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-