play.mvc
Class Mailer

java.lang.Object
  extended by play.mvc.Mailer
All Implemented Interfaces:
LocalvariablesNamesEnhancer.LocalVariablesSupport

public class Mailer
extends java.lang.Object
implements LocalvariablesNamesEnhancer.LocalVariablesSupport

Application mailer support


Field Summary
protected static java.lang.ThreadLocal<java.util.HashMap<java.lang.String,java.lang.Object>> infos
           
 
Constructor Summary
Mailer()
           
 
Method Summary
static void addAttachment(org.apache.commons.mail.EmailAttachment... attachments)
           
static void addBcc(java.lang.Object... bccs)
           
static void addCc(java.lang.Object... ccs)
           
static void addHeader(java.lang.String key, java.lang.String value)
           
static void addRecipient(java.lang.Object... recipients)
           
static java.util.concurrent.Future<java.lang.Boolean> send(java.lang.Object... args)
           
static boolean sendAndWait(java.lang.Object... args)
           
static void setCharset(java.lang.String bodyCharset)
           
static void setContentType(java.lang.String contentType)
           
static void setFrom(java.lang.Object from)
          Can be of the form xxx
static void setReplyTo(java.lang.Object replyTo)
          Can be of the form xxx
static void setSubject(java.lang.String subject, java.lang.Object... args)
          Set subject of mail, optionally providing formatting arguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

infos

protected static java.lang.ThreadLocal<java.util.HashMap<java.lang.String,java.lang.Object>> infos
Constructor Detail

Mailer

public Mailer()
Method Detail

setSubject

public static void setSubject(java.lang.String subject,
                              java.lang.Object... args)
Set subject of mail, optionally providing formatting arguments

Parameters:
subject - plain String or formatted string - interpreted as formatted string only if aguments are provided
args - optional arguments for formatting subject

addRecipient

public static void addRecipient(java.lang.Object... recipients)

addBcc

public static void addBcc(java.lang.Object... bccs)

addCc

public static void addCc(java.lang.Object... ccs)

addAttachment

public static void addAttachment(org.apache.commons.mail.EmailAttachment... attachments)

setContentType

public static void setContentType(java.lang.String contentType)

setFrom

public static void setFrom(java.lang.Object from)
Can be of the form xxx

Parameters:
from -

setReplyTo

public static void setReplyTo(java.lang.Object replyTo)
Can be of the form xxx

Parameters:
replyTo -

setCharset

public static void setCharset(java.lang.String bodyCharset)

addHeader

public static void addHeader(java.lang.String key,
                             java.lang.String value)

send

public static java.util.concurrent.Future<java.lang.Boolean> send(java.lang.Object... args)

sendAndWait

public static boolean sendAndWait(java.lang.Object... args)


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly