public class MessageBuilder extends AbstractMessage
Constructor and Description |
---|
MessageBuilder()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(Attachment attachment)
Adds an attachment.
|
void |
addRelatedAttachment(Attachment attachment)
Adds a related attachment.
|
java.util.List<AbstractPart> |
attachments()
Returns the list of attachments.
|
java.lang.String |
boundaryPrefix()
Returns the prefix to use when generating the boundary separator.
|
byte[] |
data()
Returns RFC 822 data.
|
byte[] |
dataForEncryption()
Returns RFC 822 data that can be used safely for encryption/signature.
|
java.lang.String |
htmlBody()
Returns HTML body.
|
java.lang.String |
htmlBodyRendering()
Renders the body to HTML.
|
java.lang.String |
htmlRendering(HTMLRendererTemplateCallback callback)
Renders the message to HTML.
|
byte[] |
openPGPEncryptedMessageDataWithEncryptedData(byte[] encryptedData)
Returns the RFC 822 message encrypted using PGP given the encrypted data.
|
byte[] |
openPGPSignedMessageDataWithSignatureData(byte[] signature)
Returns the RFC 822 message signed using PGP given the signature.
|
java.lang.String |
plainTextBodyRendering(boolean stripWhitespace)
Render the body to plain text.
|
java.lang.String |
plainTextRendering()
Renders the message to plain text.
|
java.util.List<Attachment> |
relatedAttachments()
Returns the list of related attachments.
|
void |
setAttachments(java.util.List<Attachment> attachments)
Sets the list of attachments.
|
void |
setBoundaryPrefix(java.lang.String boundaryPrefix)
Set the prefix to use when generating the boundary separator.
|
void |
setHTMLBody(java.lang.String htmlBody)
Sets HTML body.
|
void |
setRelatedAttachments(java.util.List<Attachment> attachments)
Sets the list of related attachments (for example, images included in the HTML body).
|
void |
setTextBody(java.lang.String textBody)
Sets plain/text body.
|
java.lang.String |
textBody()
Returns plain/text body.
|
header, htmlInlineAttachments, partForContentID, partForUniqueID, requiredPartsForRendering, setHeader
clone, finalize, initWithNative, readObject, toString, writeObject
public void setHTMLBody(java.lang.String htmlBody)
public java.lang.String htmlBody()
public void setTextBody(java.lang.String textBody)
public java.lang.String textBody()
public void setAttachments(java.util.List<Attachment> attachments)
public java.util.List<AbstractPart> attachments()
attachments
in class AbstractMessage
public void addAttachment(Attachment attachment)
public void setRelatedAttachments(java.util.List<Attachment> attachments)
public java.util.List<Attachment> relatedAttachments()
public void addRelatedAttachment(Attachment attachment)
public void setBoundaryPrefix(java.lang.String boundaryPrefix)
public java.lang.String boundaryPrefix()
public byte[] data()
public byte[] dataForEncryption()
public java.lang.String htmlRendering(HTMLRendererTemplateCallback callback)
public java.lang.String htmlBodyRendering()
public java.lang.String plainTextRendering()
public java.lang.String plainTextBodyRendering(boolean stripWhitespace)
public byte[] openPGPSignedMessageDataWithSignatureData(byte[] signature)
public byte[] openPGPEncryptedMessageDataWithEncryptedData(byte[] encryptedData)