public class Mail
extends java.lang.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 javax.mail.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 javax.mail.Session |
getSession() |
static void |
resetMailSystem() |
static java.util.concurrent.Future<java.lang.Boolean> |
send(org.apache.commons.mail.Email email)
Send an email
|
static java.util.concurrent.Future<java.lang.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 javax.mail.Session session
public static boolean asynchronousSend
protected static AbstractMailSystemFactory mailSystemFactory
public static LegacyMockMailSystem Mock
useMailSystem(MailSystem)
public static java.util.concurrent.Future<java.lang.Boolean> send(org.apache.commons.mail.Email email)
email
- An Email messageprotected static MailSystem currentMailSystem()
public static void useMailSystem(MailSystem mailSystem)
mailSystem
- The mailSystem to useMailSystem
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 javax.mail.Session getSession()
public static java.util.concurrent.Future<java.lang.Boolean> sendMessage(org.apache.commons.mail.Email msg)
msg
- An Email messageGuillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly