play.mvc

## Class Mailer

- java.lang.Object
- - play.mvc.Mailer

- All Implemented Interfaces:
    LocalvariablesNamesEnhancer.LocalVariablesSupport

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

  Application mailer support

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static java.lang.ThreadLocal<java.util.Map<java.lang.String,java.lang.Object>>` | `infos`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Mailer()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addAttachment(org.apache.commons.mail.EmailAttachment... attachments)`
    `static void` | `addBcc(java.lang.String... bccs)`
    `static void` | `addCc(java.lang.String... ccs)`
    `static void` | `addHeader(java.lang.String key, java.lang.String value)`
    `static void` | `addRecipient(java.lang.Object... recipients)` Deprecated. use method {`addRecipient(String...)`}
    `static void` | `addRecipient(java.lang.String... recipients)`
    `static void` | `attachDataSource(javax.activation.DataSource dataSource, java.lang.String name, java.lang.String description)`
    `static void` | `attachDataSource(javax.activation.DataSource dataSource, java.lang.String name, java.lang.String description, java.lang.String disposition)`
    `static java.lang.String` | `attachInlineEmbed(javax.activation.DataSource dataSource, java.lang.String name)`
    `static java.lang.String` | `getEmbedddedSrc(java.lang.String urlString, java.lang.String name)` Deprecated.
    `static java.lang.String` | `getEmbeddedSrc(java.lang.String urlString, java.lang.String name)`
    `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(javax.mail.internet.InternetAddress from)`
    `static void` | `setFrom(java.lang.String from)` Can be of the form xxx <m@m.com>
    `static void` | `setReplyTo(javax.mail.internet.InternetAddress replyTo)`
    `static void` | `setReplyTo(java.lang.String replyTo)` Can be of the form xxx <m@m.com>
    `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 final java.lang.ThreadLocal<java.util.Map<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 arguments are provided
        `args` - optional arguments for formatting subject

    - #### addRecipient

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

    - #### addRecipient

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

      Deprecated. use method {`addRecipient(String...)`}
      Add recipients
      Parameters:
        `recipients` - List of recipients

    - #### addBcc

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

    - #### addCc

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

    - #### addAttachment

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

    - #### attachDataSource

          public static void attachDataSource(javax.activation.DataSource dataSource,
                                              java.lang.String name,
                                              java.lang.String description,
                                              java.lang.String disposition)

    - #### attachDataSource

          public static void attachDataSource(javax.activation.DataSource dataSource,
                                              java.lang.String name,
                                              java.lang.String description)

    - #### attachInlineEmbed

          public static java.lang.String attachInlineEmbed(javax.activation.DataSource dataSource,
                                                           java.lang.String name)

    - #### setContentType

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

    - #### setFrom

          public static void setFrom(java.lang.String from)

      Can be of the form xxx <m@m.com>
      Parameters:
        `from` - The sender name (ex: xxx <m@m.com>)

    - #### setFrom

          public static void setFrom(javax.mail.internet.InternetAddress from)

    - #### getEmbedddedSrc

          @Deprecated
          public static java.lang.String getEmbedddedSrc(java.lang.String urlString,
                                                                     java.lang.String name)

      Deprecated.

    - #### getEmbeddedSrc

          public static java.lang.String getEmbeddedSrc(java.lang.String urlString,
                                                        java.lang.String name)

    - #### setReplyTo

          public static void setReplyTo(java.lang.String replyTo)

      Can be of the form xxx <m@m.com>
      Parameters:
        `replyTo` - : The reply to address (ex: xxx <m@m.com>)

    - #### setReplyTo

          public static void setReplyTo(javax.mail.internet.InternetAddress 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