public class Mailer extends Object implements LocalvariablesNamesEnhancer.LocalVariablesSupport
Modifier and Type | Field and Description |
---|---|
protected static ThreadLocal<Map<String,Object>> |
infos |
Constructor and Description |
---|
Mailer() |
Modifier and Type | Method and Description |
---|---|
static void |
addAttachment(org.apache.commons.mail.EmailAttachment... attachments) |
static void |
addBcc(String... bccs) |
static void |
addCc(String... ccs) |
static void |
addHeader(String key,
String value) |
static void |
addRecipient(Object... recipients) |
static void |
addRecipient(String... recipients) |
static void |
attachDataSource(DataSource dataSource,
String name,
String description) |
static void |
attachDataSource(DataSource dataSource,
String name,
String description,
String disposition) |
static String |
attachInlineEmbed(DataSource dataSource,
String name) |
static String |
getEmbedddedSrc(String urlString,
String name)
Deprecated.
|
static String |
getEmbeddedSrc(String urlString,
String name) |
static Future<Boolean> |
send(Object... args) |
static boolean |
sendAndWait(Object... args) |
static void |
setCharset(String bodyCharset) |
static void |
setContentType(String contentType) |
static void |
setFrom(InternetAddress from) |
static void |
setFrom(String from)
Can be of the form xxx <[email protected]>
|
static void |
setReplyTo(InternetAddress replyTo) |
static void |
setReplyTo(String replyTo)
Can be of the form xxx <[email protected]>
|
static void |
setSubject(String subject,
Object... args)
Set subject of mail, optionally providing formatting arguments
|
protected static final ThreadLocal<Map<String,Object>> infos
public static void setSubject(String subject, Object... args)
subject
- plain String or formatted string - interpreted as formatted string only if arguments are providedargs
- optional arguments for formatting subjectpublic static void addRecipient(String... recipients)
public static void addRecipient(Object... recipients)
public static void addBcc(String... bccs)
public static void addCc(String... ccs)
public static void addAttachment(org.apache.commons.mail.EmailAttachment... attachments)
public static void attachDataSource(DataSource dataSource, String name, String description, String disposition)
public static void attachDataSource(DataSource dataSource, String name, String description)
public static String attachInlineEmbed(DataSource dataSource, String name)
public static void setContentType(String contentType)
public static void setFrom(String from)
from
- public static void setFrom(InternetAddress from)
@Deprecated public static String getEmbedddedSrc(String urlString, String name)
public static void setReplyTo(String replyTo)
replyTo
- public static void setReplyTo(InternetAddress replyTo)
public static void setCharset(String bodyCharset)
public static boolean sendAndWait(Object... args)
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly