public class MailMessage extends Object
| Constructor and Description | 
|---|
MailMessage()
construct empty mail message that can be used with the setters 
 | 
MailMessage(JsonObject json)
construct object from a JsonObject representation 
 | 
MailMessage(MailMessage other)
copy object to another @link MailMessage object 
 | 
MailMessage(String from,
           String to,
           String subject,
           String text)
construct a simple message with text/plain 
 | 
| Modifier and Type | Method and Description | 
|---|---|
MailMessage | 
addHeader(String key,
         String value)
Add a message header. 
 | 
boolean | 
equals(Object o)  | 
List<MailAttachment> | 
getAttachment()
get the list of attachments of this mail 
 | 
List<String> | 
getBcc()
get list of bcc addresses 
 | 
String | 
getBounceAddress()
get bounce address of this mail 
 | 
List<String> | 
getCc()
get list of cc addresses 
 | 
String | 
getFrom()
get from address of this mail 
 | 
MultiMap | 
getHeaders()
Get the headers. 
 | 
String | 
getHtml()
get the html text of this mail 
 | 
List<MailAttachment> | 
getInlineAttachment()
get the list of inline attachments of this mail 
 | 
String | 
getSubject()
get the subject of this mail 
 | 
String | 
getText()
get the plain text of this mail 
 | 
List<String> | 
getTo()
get list of to addresses 
 | 
int | 
hashCode()  | 
boolean | 
isFixedHeaders()
get whether our own headers should be the only headers added to the message 
 | 
MailMessage | 
setAttachment(List<MailAttachment> attachment)
set the list of attachments of this mail 
 | 
MailMessage | 
setAttachment(MailAttachment attachment)
set a single attachment of this mail 
 | 
MailMessage | 
setBcc(List<String> bcc)
set list of bcc addresses 
 | 
MailMessage | 
setBcc(String bcc)
helper method for single recipient 
 | 
MailMessage | 
setBounceAddress(String bounceAddress)
set bounce address of this mail 
 | 
MailMessage | 
setCc(List<String> cc)
set list of cc addresses 
 | 
MailMessage | 
setCc(String cc)
helper method for single recipient 
 | 
MailMessage | 
setFixedHeaders(boolean fixedHeaders)
set whether our own headers should be the only headers added to the message 
 | 
MailMessage | 
setFrom(String from)
set from address of this mail 
 | 
MailMessage | 
setHeaders(MultiMap headers)
Set the headers. 
 | 
MailMessage | 
setHtml(String html)
set the html text of this mail 
 | 
MailMessage | 
setInlineAttachment(List<MailAttachment> inlineAttachment)
set the list of inline attachments of this mail 
 | 
MailMessage | 
setInlineAttachment(MailAttachment inlineAttachment)
set a single inline attachment of this mail 
 | 
MailMessage | 
setSubject(String subject)
set the subject of this mail 
 | 
MailMessage | 
setText(String text)
set the plain text of this mail 
 | 
MailMessage | 
setTo(List<String> to)
set list of to addresses 
 | 
MailMessage | 
setTo(String to)
helper method for single recipient 
 | 
JsonObject | 
toJson()
convert the mail message to Json representation 
 | 
public MailMessage()
public MailMessage(MailMessage other)
other - object to copypublic MailMessage(JsonObject json)
json - json object to copypublic String getBounceAddress()
public MailMessage setBounceAddress(String bounceAddress)
bounceAddress - bounce addresspublic String getFrom()
public MailMessage setFrom(String from)
from - from addrsspublic MailMessage setTo(List<String> to)
to - List of to addressespublic MailMessage setTo(String to)
to - to addresspublic MailMessage setCc(List<String> cc)
cc - List of cc addressespublic MailMessage setCc(String cc)
cc - cc addresspublic MailMessage setBcc(List<String> bcc)
bcc - List of bcc addressespublic MailMessage setBcc(String bcc)
bcc - bcc addresspublic String getSubject()
public MailMessage setSubject(String subject)
subject - the subjectpublic String getText()
public MailMessage setText(String text)
text - the textpublic String getHtml()
public MailMessage setHtml(String html)
html - the textpublic List<MailAttachment> getAttachment()
public MailMessage setAttachment(List<MailAttachment> attachment)
attachment - List of attachmentpublic MailMessage setAttachment(MailAttachment attachment)
attachment - the attachment to addpublic List<MailAttachment> getInlineAttachment()
public MailMessage setInlineAttachment(List<MailAttachment> inlineAttachment)
inlineAttachment - List of attachmentpublic MailMessage setInlineAttachment(MailAttachment inlineAttachment)
inlineAttachment - the attachment to addpublic MailMessage addHeader(String key, String value)
key - the header keyvalue - the header valuepublic MultiMap getHeaders()
public MailMessage setHeaders(MultiMap headers)
headers - the headers to setpublic boolean isFixedHeaders()
public MailMessage setFixedHeaders(boolean fixedHeaders)
fixedHeaders - the fixedHeaders to setpublic JsonObject toJson()
Copyright © 2022 Eclipse. All rights reserved.