|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.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,
java.util.Map<java.lang.String,java.lang.String> headers)
|
static javax.mail.internet.MimeMessage |
buildMessage(java.lang.Object from,
java.lang.Object replyTo,
java.lang.Object[] recipients,
java.lang.String subject,
java.lang.String body,
java.lang.String alternate,
java.lang.String contentType,
java.lang.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,
java.lang.String subject,
java.lang.String body,
java.lang.String alternate,
java.lang.String contentType,
java.lang.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,
java.lang.String subject,
java.lang.String body,
java.lang.String alternate,
java.lang.String contentType,
java.lang.String charset,
java.util.Map<java.lang.String,java.lang.String> headers,
java.lang.Object... attachments)
Construct a MimeMessage |
static javax.mail.internet.MimeMessage |
buildMimeMessage(java.lang.String from,
java.lang.String replyTo,
java.lang.String[] recipients,
java.lang.String subject,
java.lang.String body,
java.lang.String alternate,
java.lang.String contentType,
java.lang.Object... attachments)
|
protected static javax.mail.Multipart |
getMultipart(java.lang.String body,
java.lang.String alternate,
java.lang.String contentType,
java.lang.String charset)
|
static java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.Object from,
java.lang.Object replyTo,
java.lang.Object[] recipients,
java.lang.String subject,
java.lang.String body,
java.lang.String alternate,
java.lang.String contentType,
java.lang.Object... attachments)
|
static java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.String from,
java.lang.String[] recipients,
java.lang.String subject,
java.lang.String body)
Send an email in text/plain format |
static java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.String from,
java.lang.String[] recipients,
java.lang.String subject,
java.lang.String body,
javax.activation.DataSource... attachments)
Send an email in text/plain |
static java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.String from,
java.lang.String[] recipients,
java.lang.String subject,
java.lang.String body,
java.io.File... attachments)
Send an email in text/plain |
static java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.String from,
java.lang.String replyTo,
java.lang.String[] recipients,
java.lang.String subject,
java.lang.String body,
java.lang.String alternate,
java.lang.String contentType,
javax.activation.DataSource... attachments)
Send an email |
static java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.String from,
java.lang.String replyTo,
java.lang.String[] recipients,
java.lang.String subject,
java.lang.String body,
java.lang.String alternate,
java.lang.String contentType,
java.io.File... attachments)
Send an email |
static java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.String from,
java.lang.String recipient,
java.lang.String subject,
java.lang.String body)
Send an email in plain text |
static java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.String from,
java.lang.String recipient,
java.lang.String subject,
java.lang.String body,
javax.activation.DataSource... attachments)
Send an email in text/plain |
static java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.String from,
java.lang.String recipient,
java.lang.String subject,
java.lang.String body,
java.io.File... attachments)
Send an email in text/plain |
static java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.String from,
java.lang.String recipient,
java.lang.String subject,
java.lang.String body,
java.lang.String alternate)
Send an email in text/html with a text/plain alternative |
static java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.String from,
java.lang.String recipient,
java.lang.String subject,
java.lang.String body,
java.lang.String alternate,
javax.activation.DataSource... attachments)
Send an email in text/html with a text/plain alternative and attachments |
static java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.String from,
java.lang.String recipient,
java.lang.String subject,
java.lang.String body,
java.lang.String alternate,
java.io.File... attachments)
Send an email in text/html with a text/plain alternative and attachments |
static java.util.concurrent.Future<java.lang.Boolean> |
sendEmail(java.lang.Object from,
java.lang.Object replyTo,
java.lang.Object[] recipients,
java.lang.String subject,
java.lang.String body,
java.lang.String alternate,
java.lang.String contentType,
java.lang.String charset,
java.util.Map<java.lang.String,java.lang.String> headers,
java.lang.Object... attachments)
Send an email |
static java.util.concurrent.Future<java.lang.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 java.util.concurrent.Future<java.lang.Boolean> send(java.lang.String from, java.lang.String recipient, java.lang.String subject, java.lang.String body)
from
- From address. Can be of the form xxx recipient
- To address. Can be of the form xxx subject
- Subjectbody
- Bodypublic static java.util.concurrent.Future<java.lang.Boolean> send(java.lang.String from, java.lang.String recipient, java.lang.String subject, java.lang.String body, java.lang.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 java.util.concurrent.Future<java.lang.Boolean> send(java.lang.String from, java.lang.String recipient, java.lang.String subject, java.lang.String body, java.lang.String alternate, java.io.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 attachmentspublic static java.util.concurrent.Future<java.lang.Boolean> send(java.lang.String from, java.lang.String recipient, java.lang.String subject, java.lang.String body, java.lang.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 attachmentspublic static java.util.concurrent.Future<java.lang.Boolean> send(java.lang.String from, java.lang.String[] recipients, java.lang.String subject, java.lang.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 emailpublic static java.util.concurrent.Future<java.lang.Boolean> send(java.lang.String from, java.lang.String recipient, java.lang.String subject, java.lang.String body, java.io.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 attachmentspublic static java.util.concurrent.Future<java.lang.Boolean> send(java.lang.String from, java.lang.String recipient, java.lang.String subject, java.lang.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 attachmentspublic static java.util.concurrent.Future<java.lang.Boolean> send(java.lang.String from, java.lang.String[] recipients, java.lang.String subject, java.lang.String body, java.io.File... attachments)
from
- From address Can be of the form xxx recipients
- To addresses Can be of the form xxx subject
- Subjectbody
- Bodyattachments
- File attachmentspublic static java.util.concurrent.Future<java.lang.Boolean> send(java.lang.String from, java.lang.String[] recipients, java.lang.String subject, java.lang.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 attachmentspublic static java.util.concurrent.Future<java.lang.Boolean> send(java.lang.String from, java.lang.String replyTo, java.lang.String[] recipients, java.lang.String subject, java.lang.String body, java.lang.String alternate, java.lang.String contentType, java.io.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 attachmentspublic static java.util.concurrent.Future<java.lang.Boolean> send(java.lang.String from, java.lang.String replyTo, java.lang.String[] recipients, java.lang.String subject, java.lang.String body, java.lang.String alternate, java.lang.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 attachmentspublic static java.util.concurrent.Future<java.lang.Boolean> send(java.lang.Object from, java.lang.Object replyTo, java.lang.Object[] recipients, java.lang.String subject, java.lang.String body, java.lang.String alternate, java.lang.String contentType, java.lang.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 attachmentspublic static java.util.concurrent.Future<java.lang.Boolean> sendEmail(java.lang.Object from, java.lang.Object replyTo, java.lang.Object[] recipients, java.lang.String subject, java.lang.String body, java.lang.String alternate, java.lang.String contentType, java.lang.String charset, java.util.Map<java.lang.String,java.lang.String> headers, java.lang.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 attachmentspublic static javax.mail.internet.MimeMessage buildMessage(java.lang.Object from, java.lang.Object replyTo, java.lang.Object[] recipients, java.lang.String subject, java.lang.String body, java.lang.String alternate, java.lang.String contentType, java.lang.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(java.lang.String from, java.lang.String replyTo, java.lang.String[] recipients, java.lang.String subject, java.lang.String body, java.lang.String alternate, java.lang.String contentType, java.lang.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, java.lang.String subject, java.lang.String body, java.lang.String alternate, java.lang.String contentType, java.lang.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, java.lang.String subject, java.lang.String body, java.lang.String alternate, java.lang.String contentType, java.lang.String charset, java.util.Map<java.lang.String,java.lang.String> headers, java.lang.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, java.util.Map<java.lang.String,java.lang.String> headers) throws javax.mail.MessagingException
javax.mail.MessagingException
protected static javax.mail.Multipart getMultipart(java.lang.String body, java.lang.String alternate, java.lang.String contentType, java.lang.String charset) throws javax.mail.MessagingException
javax.mail.MessagingException
public static java.util.concurrent.Future<java.lang.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 |