Show:

Users.Email Class

Extends Base.Users.Email
Module: Users

Class representing 'Email' rows in the 'Users' database

Constructor

Users.Email

(
  • fields
)

Parameters:

  • fields Object

    The fields values to initialize table row as an associative array of {column: value} pairs

Item Index

Methods

Methods

sendMessage

(
  • to
  • subject
  • view
  • [fields={}]
  • [options={}]
  • callback
)
static

Send e-mail message

Parameters:

  • to String

    Comma-separated list of emails

  • subject String

    The subject. May contain variable references to members of the $fields array.

  • view String

    The name of a view for the body. Fields are passed to it.

  • [fields={}] Object optional

    The fields referenced in the subject and/or view

  • [options={}] Object optional
    • [html=false] String optional

      Whether to send as HTML email.

    • [name] String optional

      A human-readable name in addition to the address to send to.

    • [from] Array optional

      An array of [emailAddress, humanReadableName].

    • [isSource] Boolean optional

      If true, the view parameter contains the exact source, not the path of the template

  • callback Function

    Receives error, method used and response objects after complete

sendMessage

(
  • subject
  • view
  • fields={}
  • $options={}
  • callback
)

Send e-mail message

Parameters:

  • subject String

    The subject. May contain variable references to members of the $fields array.

  • view String

    The name of a view for the body. Fields are passed to it.

  • fields={} Array

    Optional. The fields referenced in the subject and/or view

  • $options={} Array

    Optional. Array of options. Can include:
    "html" => Defaults to false. Whether to send as HTML email.
    "from" => An array of emailAddress, human_readable_name

  • callback Function

    Receives error and response objects after complete

setUp

()

The setUp() method is called the first time an object of this class is constructed.