|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectplay.libs.Mail
public class Mail
Mail utils
| Nested Class Summary | |
|---|---|
static class |
Mail.Mock
|
static class |
Mail.SMTPAuthenticator
|
| Field Summary | |
|---|---|
static boolean |
asynchronousSend
|
static javax.mail.Session |
session
|
| Constructor Summary | |
|---|---|
Mail()
|
|
| Method Summary | |
|---|---|
protected static javax.mail.internet.MimeMessage |
addHeaders(javax.mail.internet.MimeMessage msg,
Map<String,String> headers)
|
static javax.mail.internet.MimeMessage |
buildMessage(Object from,
Object replyTo,
Object[] recipients,
String subject,
String body,
String alternate,
String contentType,
Object... attachments)
Original method from the 1.0 release. |
static javax.mail.internet.MimeMessage |
buildMimeMessage(javax.mail.internet.InternetAddress from,
javax.mail.internet.InternetAddress replyTo,
javax.mail.internet.InternetAddress[] recipients,
String subject,
String body,
String alternate,
String contentType,
Object... attachments)
Construct a MimeMessage |
static javax.mail.internet.MimeMessage |
buildMimeMessage(javax.mail.internet.InternetAddress from,
javax.mail.internet.InternetAddress replyTo,
javax.mail.internet.InternetAddress[] recipients,
String subject,
String body,
String alternate,
String contentType,
String charset,
Map<String,String> headers,
Object... attachments)
Construct a MimeMessage |
static javax.mail.internet.MimeMessage |
buildMimeMessage(String from,
String replyTo,
String[] recipients,
String subject,
String body,
String alternate,
String contentType,
Object... attachments)
|
protected static javax.mail.Multipart |
getMultipart(String body,
String alternate,
String contentType,
String charset)
|
static Future<Boolean> |
send(Object from,
Object replyTo,
Object[] recipients,
String subject,
String body,
String alternate,
String contentType,
Object... attachments)
|
static Future<Boolean> |
send(String from,
String[] recipients,
String subject,
String body)
Send an email in text/plain format |
static Future<Boolean> |
send(String from,
String[] recipients,
String subject,
String body,
javax.activation.DataSource... attachments)
Send an email in text/plain |
static Future<Boolean> |
send(String from,
String[] recipients,
String subject,
String body,
File... attachments)
Send an email in text/plain |
static Future<Boolean> |
send(String from,
String replyTo,
String[] recipients,
String subject,
String body,
String alternate,
String contentType,
javax.activation.DataSource... attachments)
Send an email |
static Future<Boolean> |
send(String from,
String replyTo,
String[] recipients,
String subject,
String body,
String alternate,
String contentType,
File... attachments)
Send an email |
static Future<Boolean> |
send(String from,
String recipient,
String subject,
String body)
Send an email in plain text |
static Future<Boolean> |
send(String from,
String recipient,
String subject,
String body,
javax.activation.DataSource... attachments)
Send an email in text/plain |
static Future<Boolean> |
send(String from,
String recipient,
String subject,
String body,
File... attachments)
Send an email in text/plain |
static Future<Boolean> |
send(String from,
String recipient,
String subject,
String body,
String alternate)
Send an email in text/html with a text/plain alternative |
static Future<Boolean> |
send(String from,
String recipient,
String subject,
String body,
String alternate,
javax.activation.DataSource... attachments)
Send an email in text/html with a text/plain alternative and attachments |
static Future<Boolean> |
send(String from,
String recipient,
String subject,
String body,
String alternate,
File... attachments)
Send an email in text/html with a text/plain alternative and attachments |
static Future<Boolean> |
sendEmail(Object from,
Object replyTo,
Object[] recipients,
Object[] ccs,
Object[] bccs,
String subject,
String body,
String alternate,
String contentType,
String charset,
Map<String,String> headers,
Object... attachments)
Send an email |
static Future<Boolean> |
sendEmail(Object from,
Object replyTo,
Object[] recipients,
String subject,
String body,
String alternate,
String contentType,
String charset,
Map<String,String> headers,
Object... attachments)
Send an email |
static Future<Boolean> |
sendMessage(javax.mail.Message msg)
Send a JavaMail message |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static javax.mail.Session session
public static boolean asynchronousSend
| Constructor Detail |
|---|
public Mail()
| Method Detail |
|---|
public static Future<Boolean> send(String from,
String recipient,
String subject,
String body)
from - From address. Can be of the form xxx recipient - To address. Can be of the form xxx subject - Subjectbody - Body
public static Future<Boolean> send(String from,
String recipient,
String subject,
String body,
String alternate)
from - From address. Can be of the form xxx recipient - To address. Can be of the form xxx subject - Subjectbody - text/html body contentalternate - text/plain alternative content (optional)
public static Future<Boolean> send(String from,
String recipient,
String subject,
String body,
String alternate,
File... attachments)
from - From address. Can be of the form xxx recipient - To address. Can be of the form xxx subject - Subjectbody - text/html body contentalternate - text/plain alternative content (optional)attachments - File attachments
public static Future<Boolean> send(String from,
String recipient,
String subject,
String body,
String alternate,
javax.activation.DataSource... attachments)
from - From address. Can be of the form xxx recipient - To address. Can be of the form xxx subject - Subjectbody - text/html body contentalternate - text/plain alternative content (optional)attachments - DataSource attachments
public static Future<Boolean> send(String from,
String[] recipients,
String subject,
String body)
from - From address. Can be of the form xxx recipients - To addresses. Can be of the form xxx subject - Subjectbody - The text/plain body of the email
public static Future<Boolean> send(String from,
String recipient,
String subject,
String body,
File... attachments)
from - From address. Can be of the form xxx recipient - To address. Can be of the form xxx subject - Subjectbody - plain/text body of the emailattachments - File attachments
public static Future<Boolean> send(String from,
String recipient,
String subject,
String body,
javax.activation.DataSource... attachments)
from - From address. Can be of the form xxx recipient - To address. Can be of the form xxx subject - Subjectbody - plain/text body of the emailattachments - DataSource attachments
public static Future<Boolean> send(String from,
String[] recipients,
String subject,
String body,
File... attachments)
from - From address Can be of the form xxx recipients - To addresses Can be of the form xxx subject - Subjectbody - Bodyattachments - File attachments
public static Future<Boolean> send(String from,
String[] recipients,
String subject,
String body,
javax.activation.DataSource... attachments)
from - From address Can be of the form xxx recipients - To addresses Can be of the form xxx subject - Subjectbody - Bodyattachments - DataSource attachments
public static Future<Boolean> send(String from,
String replyTo,
String[] recipients,
String subject,
String body,
String alternate,
String contentType,
File... attachments)
from - From address. Can be of the form xxx replyTo - ReplyTo address Can be of the form xxx recipients - To addressessubject - Subjectbody - body of the emailalternate - text/plain body (optional). This parameter is ignored if contentType is set to text/plain or is null.contentType - The content type of the body (text/plain or text/html)attachments - File attachments
public static Future<Boolean> send(String from,
String replyTo,
String[] recipients,
String subject,
String body,
String alternate,
String contentType,
javax.activation.DataSource... attachments)
from - From address. Can be of the form xxx replyTo - ReplyTo address Can be of the form xxx recipients - To addressessubject - Subjectbody - body of the emailalternate - text/plain body (optional). This parameter is ignored if contentType is set to text/plain or is null.contentType - The content type of the body (text/plain or text/html)attachments - DataSource attachments
public static Future<Boolean> send(Object from,
Object replyTo,
Object[] recipients,
String subject,
String body,
String alternate,
String contentType,
Object... attachments)
from - From address a String or an InternetAddressreplyTo - ReplyTo address a String or an InternetAddressrecipients - To addresses an Array of String or/and InternetAddresssubject - Subjectbody - body of the emailalternate - text/plain body (optional). This parameter is ignored if contentType is set to text/plain or is null.contentType - The content type of the body (text/plain or text/html)attachments - File attachments
public static Future<Boolean> sendEmail(Object from,
Object replyTo,
Object[] recipients,
String subject,
String body,
String alternate,
String contentType,
String charset,
Map<String,String> headers,
Object... attachments)
from - From address a String or an InternetAddressreplyTo - ReplyTo address a String or an InternetAddressrecipients - To addresses an Array of String or/and InternetAddresssubject - Subjectbody - body of the emailalternate - text/plain body (optional). This parameter is ignored if contentType is set to text/plain or is null.contentType - The content type of the body (text/plain or text/html)charset - The character set of the message (optional)headers - The mail headers (optional)attachments - File or DataSource attachments
public static Future<Boolean> sendEmail(Object from,
Object replyTo,
Object[] recipients,
Object[] ccs,
Object[] bccs,
String subject,
String body,
String alternate,
String contentType,
String charset,
Map<String,String> headers,
Object... attachments)
from - From address a String or an InternetAddressreplyTo - ReplyTo address a String or an InternetAddressrecipients - To addresses an Array of String or/and InternetAddresssubject - Subjectbody - body of the emailalternate - text/plain body (optional). This parameter is ignored if contentType is set to text/plain or is null.contentType - The content type of the body (text/plain or text/html)charset - The character set of the message (optional)headers - The mail headers (optional)attachments - File or DataSource attachments
public static javax.mail.internet.MimeMessage buildMessage(Object from,
Object replyTo,
Object[] recipients,
String subject,
String body,
String alternate,
String contentType,
Object... attachments)
throws javax.mail.MessagingException
from - From address a String or an InternetAddressreplyTo - ReplyTo address a String or an InternetAddressrecipients - To addresses an Array of String or/and InternetAddresssubject - body - alternate - contentType - attachments -
javax.mail.MessagingException
public static javax.mail.internet.MimeMessage buildMimeMessage(String from,
String replyTo,
String[] recipients,
String subject,
String body,
String alternate,
String contentType,
Object... attachments)
throws javax.mail.MessagingException
from - replyTo - recipients - subject - body - alternate - contentType - attachments -
javax.mail.MessagingException
public static javax.mail.internet.MimeMessage buildMimeMessage(javax.mail.internet.InternetAddress from,
javax.mail.internet.InternetAddress replyTo,
javax.mail.internet.InternetAddress[] recipients,
String subject,
String body,
String alternate,
String contentType,
Object... attachments)
throws javax.mail.MessagingException
from - From addressrecipients - To addressessubject - Subjectbody - body of the emailalternate - text/plain body (optional). This parameter is ignored if contentType is set to text/plain or is null.contentType - The content type of the body (text/plain or text/html) (optional)attachments - File attachments
javax.mail.MessagingException
public static javax.mail.internet.MimeMessage buildMimeMessage(javax.mail.internet.InternetAddress from,
javax.mail.internet.InternetAddress replyTo,
javax.mail.internet.InternetAddress[] recipients,
String subject,
String body,
String alternate,
String contentType,
String charset,
Map<String,String> headers,
Object... attachments)
throws javax.mail.MessagingException
from - From addressrecipients - To addressessubject - Subjectbody - body of the emailalternate - text/plain body (optional). This parameter is ignored if contentType is set to text/plain or is null.contentType - The content type of the body (text/plain or text/html) (optional)charset - The character set of the message (optional)headers - The mail headers (optional)attachments - File or DataSource attachments
javax.mail.MessagingException
protected static javax.mail.internet.MimeMessage addHeaders(javax.mail.internet.MimeMessage msg,
Map<String,String> headers)
throws javax.mail.MessagingException
javax.mail.MessagingException
protected static javax.mail.Multipart getMultipart(String body,
String alternate,
String contentType,
String charset)
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic static Future<Boolean> sendMessage(javax.mail.Message msg)
msg - A JavaMail message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||