Class MailMessage
java.lang.Object
io.vertx.ext.mail.MailMessage
represent a mail message that can be sent via the MailClient
- Author:
- Alexander Lehmann
-
Constructor Summary
ConstructorsConstructorDescriptionconstruct empty mail message that can be used with the settersMailMessage(JsonObject json) construct object from a JsonObject representationMailMessage(MailMessage other) copy object to another @link MailMessage objectMailMessage(String from, String to, String subject, String text) construct a simple message with text/plain -
Method Summary
Modifier and TypeMethodDescriptionAdd a message header.booleanget the list of attachments of this mailgetBcc()get list of bcc addressesget bounce address of this mailgetCc()get list of cc addressesgetFrom()get from address of this mailGet the headers.getHtml()get the html text of this mailget the list of inline attachments of this mailget the subject of this mailgetText()get the plain text of this mailgetTo()get list of to addressesinthashCode()booleanget whether our own headers should be the only headers added to the messagesetAttachment(MailAttachment attachment) set a single attachment of this mailsetAttachment(List<MailAttachment> attachment) set the list of attachments of this mailhelper method for single recipientset list of bcc addressessetBounceAddress(String bounceAddress) set bounce address of this mailhelper method for single recipientset list of cc addressessetFixedHeaders(boolean fixedHeaders) set whether our own headers should be the only headers added to the messageset from address of this mailsetHeaders(MultiMap headers) Set the headers.set the html text of this mailsetInlineAttachment(MailAttachment inlineAttachment) set a single inline attachment of this mailsetInlineAttachment(List<MailAttachment> inlineAttachment) set the list of inline attachments of this mailsetSubject(String subject) set the subject of this mailset the plain text of this mailhelper method for single recipientset list of to addressestoJson()convert the mail message to Json representation
-
Constructor Details
-
MailMessage
public MailMessage()construct empty mail message that can be used with the setters -
MailMessage
copy object to another @link MailMessage object- Parameters:
other- object to copy
-
MailMessage
construct object from a JsonObject representation- Parameters:
json- json object to copy
-
MailMessage
-
-
Method Details
-
getBounceAddress
-
setBounceAddress
set bounce address of this mail- Parameters:
bounceAddress- bounce address- Returns:
- this to be able to use it fluently
-
getFrom
-
setFrom
set from address of this mail- Parameters:
from- from addrss- Returns:
- this to be able to use it fluently
-
getTo
-
setTo
set list of to addresses- Parameters:
to- List of to addresses- Returns:
- this to be able to use it fluently
-
setTo
helper method for single recipient- Parameters:
to- to address- Returns:
- this to be able to use it fluently
-
getCc
-
setCc
set list of cc addresses- Parameters:
cc- List of cc addresses- Returns:
- this to be able to use it fluently
-
setCc
helper method for single recipient- Parameters:
cc- cc address- Returns:
- this to be able to use it fluently
-
getBcc
-
setBcc
set list of bcc addresses- Parameters:
bcc- List of bcc addresses- Returns:
- this to be able to use it fluently
-
setBcc
helper method for single recipient- Parameters:
bcc- bcc address- Returns:
- this to be able to use it fluently
-
getSubject
-
setSubject
set the subject of this mail- Parameters:
subject- the subject- Returns:
- this to be able to use it fluently
-
getText
-
setText
set the plain text of this mail- Parameters:
text- the text- Returns:
- this to be able to use it fluently
-
getHtml
-
setHtml
set the html text of this mail- Parameters:
html- the text- Returns:
- this to be able to use it fluently
-
getAttachment
get the list of attachments of this mail- Returns:
- List of attachment
-
setAttachment
set the list of attachments of this mail- Parameters:
attachment- List of attachment- Returns:
- this to be able to use it fluently
-
setAttachment
set a single attachment of this mail- Parameters:
attachment- the attachment to add- Returns:
- this to be able to use it fluently
-
getInlineAttachment
get the list of inline attachments of this mail- Returns:
- List of attachment
-
setInlineAttachment
set the list of inline attachments of this mail- Parameters:
inlineAttachment- List of attachment- Returns:
- this to be able to use it fluently
-
setInlineAttachment
set a single inline attachment of this mail- Parameters:
inlineAttachment- the attachment to add- Returns:
- this to be able to use it fluently
-
addHeader
Add a message header.- Parameters:
key- the header keyvalue- the header value- Returns:
- a reference to this, so the API can be used fluently
-
getHeaders
-
setHeaders
Set the headers.- Parameters:
headers- the headers to set- Returns:
- this to be able to use it fluently
-
isFixedHeaders
public boolean isFixedHeaders()get whether our own headers should be the only headers added to the message- Returns:
- the fixedHeaders
-
setFixedHeaders
set whether our own headers should be the only headers added to the message- Parameters:
fixedHeaders- the fixedHeaders to set- Returns:
- this to be able to use it fluently
-
toJson
-
equals
-
hashCode
-