public interface MailService
MailService provides a way for user code to send emails
to arbitrary destinations.| Modifier and Type | Interface and Description |
|---|---|
static class |
MailService.Attachment |
static class |
MailService.Header |
static class |
MailService.Message
Messages are prepared by the caller, and then submitted to the Mail service
for sending.
|
| Modifier and Type | Method and Description |
|---|---|
void |
send(MailService.Message message)
Sends a mail that has been prepared in a MailService.Message.
|
void |
sendToAdmins(MailService.Message message)
Send an email alert to all admins of an application.
|
void send(MailService.Message message) throws java.io.IOException
The message will be delivered asynchronously, and delivery problems will result in a bounce to the specified sender.
Sender and at least one of the collections for to, cc, bcc
must not be null.
message - The message to be sent.java.lang.IllegalArgumentException - when incorrect arguments are passed.java.io.IOException - on internal delivery errors.void sendToAdmins(MailService.Message message) throws java.io.IOException
The message will be delivered asynchronously, and delivery problems will result in a bounce to the admins.
The content of the to, cc, bcc fields should be null.
message - The message to be sent.java.lang.IllegalArgumentException - when incorrect arguments are passed.java.io.IOException - on internal delivery errors.