|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MailMessage
Base interface for creating email messages.
| Method Summary | |
|---|---|
MailMessage |
addAttachment(Collection<EmailAttachment> attachments)
Adds a Collection of Attachments to the message |
MailMessage |
addAttachment(ContentDisposition contentDispostion,
File file)
Adds Attachment to the message |
MailMessage |
addAttachment(EmailAttachment attachment)
Adds Attachment to the message |
MailMessage |
addAttachment(String fileName,
String mimeType,
ContentDisposition contentDispostion,
byte[] bytes)
Adds Attachment to the message |
MailMessage |
addAttachment(String fileName,
String mimeType,
ContentDisposition contentDispostion,
InputStream inputStream)
Adds Attachment to the message |
MailMessage |
addHeader(String name,
String value)
Add header to the message. |
MailMessage |
bcc(Collection<EmailContact> emailContacts)
Add collection of BCC (Blind Carbon Copy) recipients |
MailMessage |
bcc(EmailContact emailContact)
Add BCC recipient |
MailMessage |
bcc(javax.mail.internet.InternetAddress emailAddress)
Add BCC (Blind Carbon Copy) recipient |
MailMessage |
bcc(String address)
Convenience method to add a BCC (Blind Carbon Copy) recipient |
MailMessage |
bcc(String address,
String name)
Convenience method to add a BCC (Blind Carbon Copy) recipient |
MailMessage |
bodyHtml(String html)
Sets the body of the message a HTML body represented by the supplied string |
MailMessage |
bodyHtml(TemplateProvider htmlBody)
Sets the HTML body of the message to the HTML output of the given template |
MailMessage |
bodyHtmlTextAlt(String html,
String text)
Sets the body of the message to a HTML body with a plain text alternative |
MailMessage |
bodyHtmlTextAlt(TemplateProvider htmlBody,
TemplateProvider textbody)
Sets the body of the message to a HTML body with a plain text alternative output of the given templates |
MailMessage |
bodyText(String text)
Sets the body of the message a plan text body represented by the supplied string |
MailMessage |
bodyText(TemplateProvider textbody)
Sets the text body of the message to the plain text output of the given template |
MailMessage |
cc(Collection<EmailContact> emailContacts)
Add collection of CC (Carbon Copy) recipients |
MailMessage |
cc(EmailContact emailContact)
Add CC recipient |
MailMessage |
cc(javax.mail.internet.InternetAddress emailAddress)
Add CC (Carbon Copy) recipient |
MailMessage |
cc(String address)
Convenience method to add a CC (Carbon Copy) recipient |
MailMessage |
cc(String address,
String name)
Convenience method to add a CC (Carbon Copy) recipient |
MailMessage |
contentType(ContentType contentType)
Set the Content Type of the message |
MailMessage |
deliveryReceipt(String address)
Request a delivery receipt "Return-Receipt-To" to the given address |
MailMessage |
from(Collection<EmailContact> emailContacts)
Adds a Collection of EmailContact as FROM addresses |
MailMessage |
from(EmailContact emailContact)
Adds a From Address |
MailMessage |
from(javax.mail.internet.InternetAddress emailAddress)
Adds a From Address |
MailMessage |
from(String address)
Convenience method to add a FROM address |
MailMessage |
from(String address,
String name)
Convenience method to add a FROM address |
EmailMessage |
getEmailMessage()
Get the EmailMessage representing this MailMessage |
MailMessage |
iCal(String htmlSummary,
byte[] bytes)
Used for creating iCal Calendar Invites. |
MailMessage |
importance(MessagePriority messagePriority)
Sets the importance level of the message with a given MessagePriority |
EmailMessage |
mergeTemplates()
Merge the templates with the context |
MailMessage |
messageId(String messageId)
Set the Message-ID for the message. |
MailMessage |
put(Map<String,Object> values)
Places a Map of variable in the templating engines context |
MailMessage |
put(String name,
Object value)
Places a variable in the templating engines context |
MailMessage |
readReceipt(String address)
Request a read receipt "Disposition-Notification-To" to a given address |
MailMessage |
replyTo(Collection<EmailContact> emailContacts)
Adds a Collection of EmailContact as REPLY-TO addresses |
MailMessage |
replyTo(EmailContact emailContact)
Adds a REPLY-TO Address |
MailMessage |
replyTo(javax.mail.internet.InternetAddress emailAddress)
Adds a REPLY-TO Address |
MailMessage |
replyTo(String address)
Convenience method to add a REPLY-TO address |
MailMessage |
replyTo(String address,
String name)
Convenience method to add a REPLY-TO name and address |
EmailMessage |
send()
Send the Message Asynchronously |
EmailMessage |
send(javax.mail.Session session)
Send the Message |
void |
setEmailMessage(EmailMessage emailMessage)
Set the EmailMessage representing this MailMessage |
MailMessage |
subject(String value)
Set the subject on the message |
MailMessage |
subject(TemplateProvider subject)
Set the template to be used for the message subject |
MailMessage |
to(Collection<EmailContact> emailContacts)
Convenience method to add a TO recipients |
MailMessage |
to(EmailContact emailContact)
Add TO recipient |
MailMessage |
to(javax.mail.internet.InternetAddress emailAddress)
Add TO recipient |
MailMessage |
to(String address)
Convenience method to add a TO address |
MailMessage |
to(String address,
String name)
Convenience method to add a TO recipient |
| Method Detail |
|---|
MailMessage from(String address)
address - Email address of the recipient eq "john.doe@example.com"
InvalidAddressException - if address is in invalid format
MailMessage from(String address,
String name)
name - Personal name of the recipient eg "John Doe"address - Email address of the recipient eg "john.doe@example.com"
InvalidAddressException - if address is in invalid formatMailMessage from(javax.mail.internet.InternetAddress emailAddress)
emailAddress - InternetAddress of the address to be addedMailMessage from(EmailContact emailContact)
emailContact - EmailContact of the address to be addedMailMessage from(Collection<EmailContact> emailContacts)
EmailContact as FROM addresses
emailContacts - Collection of EmailContact to be addedMailMessage replyTo(String address)
address - Email address of the recipient eq "john.doe@example.com
InvalidAddressException - if address is in invalid format"
MailMessage replyTo(String address,
String name)
name - Personal name of the recipient eg "John Doe"address - Email address of the recipient eg "john.doe@example.com"
InvalidAddressException - if address is in invalid formatMailMessage replyTo(javax.mail.internet.InternetAddress emailAddress)
emailAddress - InternetAddress of the address to be addedMailMessage replyTo(EmailContact emailContact)
emailContact - EmailContact of the address to be addedMailMessage replyTo(Collection<EmailContact> emailContacts)
EmailContact as REPLY-TO addresses
emailContacts - Collection of EmailContact to be added
MailMessage addHeader(String name,
String value)
name - Header namevalue - Header valueMailMessage to(String address)
address - Email address of the recipient eq "john.doe@example.com"
InvalidAddressException - if address is in invalid format
MailMessage to(String address,
String name)
name - Personal name of the recipient eg "John Doe"address - Email address of the recipient eg "john.doe@example.com"
InvalidAddressException - if address is in invalid formatMailMessage to(javax.mail.internet.InternetAddress emailAddress)
emailAddress - InternetAddress of the address to be addedMailMessage to(EmailContact emailContact)
emailContact - EmailContact of the address to be addedMailMessage to(Collection<EmailContact> emailContacts)
emailContacts - Collection of EmailContact to be addedMailMessage cc(String address)
address - Email address of the recipient eg "john.doe@example.com"
InvalidAddressException - if address is in invalid format
MailMessage cc(String address,
String name)
name - Personal name of the recipient eg "John Doe"address - Email address of the recipient eg "john.doe@example.com"
InvalidAddressException - if address is in invalid formatMailMessage cc(javax.mail.internet.InternetAddress emailAddress)
emailAddress - InternetAddress of the address to be addedMailMessage cc(EmailContact emailContact)
emailContact - EmailContact of the address to be addedMailMessage cc(Collection<EmailContact> emailContacts)
emailContacts - Collection of EmailContact to be addedMailMessage bcc(String address)
address - Email address of the recipient eg "john.doe@example.com"
InvalidAddressException - if address is in invalid format
MailMessage bcc(String address,
String name)
name - Personal name of the recipient eg "John Doe"address - Email address of the recipient eg "john.doe@example.com"
InvalidAddressException - if address is in invalid formatMailMessage bcc(javax.mail.internet.InternetAddress emailAddress)
emailAddress - InternetAddress of the address to be addedMailMessage bcc(EmailContact emailContact)
emailContact - EmailContact of the address to be addedMailMessage bcc(Collection<EmailContact> emailContacts)
emailContacts - Collection of EmailContact to be addedMailMessage addAttachment(EmailAttachment attachment)
attachment - EmailAttachment to be addedMailMessage addAttachment(Collection<EmailAttachment> attachments)
attachments -
MailMessage addAttachment(String fileName,
String mimeType,
ContentDisposition contentDispostion,
byte[] bytes)
fileName - mimeType - contentDispostion - bytes -
MailMessage addAttachment(String fileName,
String mimeType,
ContentDisposition contentDispostion,
InputStream inputStream)
fileName - mimeType - contentDispostion - inputStream -
MailMessage addAttachment(ContentDisposition contentDispostion,
File file)
contentDispostion - file - MailMessage importance(MessagePriority messagePriority)
MessagePriority
messagePriority - The priority level of the message.MailMessage deliveryReceipt(String address)
address - Email address the receipt should be sent to
InvalidAddressException - if address is in invalid formatMailMessage readReceipt(String address)
address - Email address the receipt should be sent to
InvalidAddressException - if address is in invalid formatMailMessage messageId(String messageId)
messageId -
MailMessage iCal(String htmlSummary,
byte[] bytes)
htmlSummary - Summary of the invite to be displayed in the body of the email messages.bytes - iCal data which will be attached to the messageMailMessage subject(String value)
value - Subject of the messageMailMessage bodyText(String text)
text - Plain text bodyMailMessage bodyHtml(String html)
html - HTML body
MailMessage bodyHtmlTextAlt(String html,
String text)
html - HTML bodytext - Plain text bodyMailMessage contentType(ContentType contentType)
contentType - EmailMessage getEmailMessage()
EmailMessage representing this MailMessage
EmailMessage representing this MailMessagevoid setEmailMessage(EmailMessage emailMessage)
EmailMessage representing this MailMessage
EmailMessage mergeTemplates()
EmailMessage send(javax.mail.Session session)
session - Session to use to send the MailMessage
EmailMessage which represents the MailMessage as sent
SendFailedException - If the messages fails to be sent.EmailMessage send()
EmailMessage which represents the MailMessage as sent
SendFailedException - If the messages fails to be sent.MailMessage subject(TemplateProvider subject)
subject - TemplateProvider to use
TemplatingExceptionMailMessage bodyText(TemplateProvider textbody)
textBody - TemplateProvider to use
TemplatingExceptionMailMessage bodyHtml(TemplateProvider htmlBody)
htmlBody - TemplateProvider to use
TemplatingException
MailMessage bodyHtmlTextAlt(TemplateProvider htmlBody,
TemplateProvider textbody)
htmlBody - TemplateProvider to use for HTML portion of messagetextBody - TemplateProvider to use for Text alternative portion of message
TemplatingException
MailMessage put(String name,
Object value)
name - Reference name of the objectvalue - the Object being placed in the contextMailMessage put(Map<String,Object> values)
values - Map
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||