public class Mail extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Mail.SMTPAuthenticator |
Modifier and Type | Field and Description |
---|---|
static boolean |
asynchronousSend |
protected static AbstractMailSystemFactory |
mailSystemFactory |
static LegacyMockMailSystem |
Mock
Just kept for compatibility reasons, use test double substitution mechanism instead.
|
static Session |
session |
Constructor and Description |
---|
Mail() |
Modifier and Type | Method and Description |
---|---|
static org.apache.commons.mail.Email |
buildMessage(org.apache.commons.mail.Email email) |
protected static MailSystem |
currentMailSystem() |
static Session |
getSession() |
static void |
resetMailSystem() |
static Future<Boolean> |
send(org.apache.commons.mail.Email email)
Send an email
|
static Future<Boolean> |
sendMessage(org.apache.commons.mail.Email msg)
Send a JavaMail message
|
static void |
useMailSystem(MailSystem mailSystem)
Through this method you can substitute the current MailSystem.
|
public static Session session
public static boolean asynchronousSend
protected static AbstractMailSystemFactory mailSystemFactory
public static LegacyMockMailSystem Mock
useMailSystem(MailSystem)
protected static MailSystem currentMailSystem()
public static void useMailSystem(MailSystem mailSystem)
MailSystem
public static void resetMailSystem()
public static org.apache.commons.mail.Email buildMessage(org.apache.commons.mail.Email email) throws org.apache.commons.mail.EmailException
org.apache.commons.mail.EmailException
public static Session getSession()
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly