public final class MailOptions extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MailOptions.Notify |
static class |
MailOptions.Template
The email template to use.
|
Constructor and Description |
---|
MailOptions()
Creates a new set of mail options.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(String url) |
void |
addRecipients(String email) |
List<String> |
getAttachments() |
String |
getAttachmentsAsString() |
String |
getContent() |
MailOptions.Notify |
getNotify() |
List<String> |
getRecipients() |
String |
getRecipientsAsString() |
MailOptions.Template |
getTemplate() |
boolean |
hasAttachments()
Indicate whether the attachments have been specified.
|
boolean |
hasRecipients()
Indicate whether the recipients have been specified.
|
void |
setContent(String content) |
void |
setNotify(MailOptions.Notify notify) |
void |
setTemplate(MailOptions.Template template) |
void |
setTemplate(String template) |
public String getContent()
public void setContent(String content)
content
- the content to setpublic MailOptions.Template getTemplate()
public void setTemplate(String template)
template
- the template to setpublic void setTemplate(MailOptions.Template template)
template
- the template to setpublic MailOptions.Notify getNotify()
public void setNotify(MailOptions.Notify notify)
notify
- the notify to setpublic boolean hasRecipients()
true
if there is at least one recipient;
false
otherwise.public String getRecipientsAsString()
public void addRecipients(String email)
email
- the email address to add to the list of recipient.public boolean hasAttachments()
true
if there is at least one attachment;
false
otherwise.public String getAttachmentsAsString()
public void addAttachment(String url)
url
- the URL to the attachment to add.Copyright © 2016 Allette Systems. All rights reserved.