Package com.isomorphic.mail

# Class TemplatedMailMessage

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

All Implemented Interfaces:
  `com.isomorphic.base.IAutoConfigurable`

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
  Description
  `TemplatedMailMessage()`
  Creates a new `TemplatedMailMessage`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addRecipient(String recipient)`
  Adds a recipient to the email.
  `void`
  `addRecipients(List recipients)`
  Adds a list of recipients to the email.
  `MailMessageParseMode`
  `getMessageParseMode()`
  Returns the current state of the message parsing mode.
  `void`
  `setMessageParseMode(MailMessageParseMode value)`
  Configures whether and how the message body is parsed for header values like "To:" and "From:".
  `void`
  `setRecipient(String recipient)`
  Adds a recipient to the email.

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

  `addHeader, addHeaders, addRecipient, addRecipients, addRecipients, addRecipients, addReplyTo, getBodyWriter, reset, send, setAuth, setBody, setContextMap, setFrom, setHost, setPassword, setPort, setProperty, setReplyTo, setReplyTo, setSubject, setUser`

- ## Constructor Details

  - ### TemplatedMailMessage

    public TemplatedMailMessage()
    Creates a new `TemplatedMailMessage`.

- ## Method Details

  - ### setMessageParseMode

    public void setMessageParseMode(MailMessageParseMode value)
    Configures whether and how the message body is parsed for header values like "To:" and "From:". The default parsing mode for a message is set globally by config property "mail.message.defaultParseMode", or "None" if that property is unset.
    Parameters:
      `value` - The new value for the message parsing mode.

  - ### getMessageParseMode

    public MailMessageParseMode getMessageParseMode()
    Returns the current state of the message parsing mode. The default parsing mode for a message is set globally by config property "mail.message.defaultParseMode", or "None" if that property is unset.
    Returns:
      The current state of the message parsing mode.

  - ### addRecipient

    public void addRecipient(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(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(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