com.isomorphic.mail

## Class TemplatedMailMessage

- java.lang.Object
- - com.isomorphic.base.Base
  - - com.isomorphic.mail.MailMessage
    - - com.isomorphic.mail.TemplatedMailMessage

-     public class TemplatedMailMessage
      extends MailMessage

  A mail message that supports the use of Velocity Template Language to enable message templates and runtime substitution. This class underlies the `mail` atrribute of an `operationBinding` - see the SmartClient client Reference for details.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TemplatedMailMessage()` Creates a new `TemplatedMailMessage`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRecipient(java.lang.String recipient)` Adds a recipient to the email.
    `void` | `addRecipients(java.util.List recipients)` Adds a list of recipients to the email.
    `void` | `setContextMap(java.util.Map value)` Sets the context map to use with this templated message.
    `void` | `setRecipient(java.lang.String recipient)` Adds a recipient to the email.

    - ### Methods inherited from class com.isomorphic.mail.MailMessage

      `addHeader, addHeaders, addRecipient, addRecipients, addRecipients, addRecipients, addReplyTo, getBodyWriter, parse, reset, send, setBody, setFrom, setReplyTo, setReplyTo, setSubject`

- - ### Constructor Detail

    - #### TemplatedMailMessage

          public TemplatedMailMessage()

      Creates a new `TemplatedMailMessage`.

  - ### Method Detail

    - #### setContextMap

          public void setContextMap(java.util.Map value)

      Sets the context map to use with this templated message. Velocity looks in the context map to find its substitution values
      Parameters:
        `value` - The new context map

    - #### addRecipient

          public void addRecipient(java.lang.String recipient)

      Adds a recipient to the email.
      Overrides:
        `addRecipient` in class `MailMessage`
      Parameters:
        `recipient` - the email address of the recipient

    - #### setRecipient

          public void setRecipient(java.lang.String recipient)

      Adds a recipient to the email. This method here for DataTools.setProperties() style interaction.
      Overrides:
        `setRecipient` in class `MailMessage`
      Parameters:
        `recipient` - the email address of the recipient

    - #### addRecipients

          public void addRecipients(java.util.List recipients)

      Adds a list of recipients to the email.
      Overrides:
        `addRecipients` in class `MailMessage`
      Parameters:
        `recipients` - the list of email addresses of the recipients