Show:

Users_Email Class

Extends Base_Users_Email
Module: Users

Class representing 'Email' rows in the 'Users' database You can create an object of this class either to access its non-static methods, or to actually represent a email row in the Users database.

Methods

__set_state

(
  • $array
)
Users_Email

Implements the __set_state method, so it can work with with var_export and be re-imported successfully.

Parameters:

  • $array Array

Returns:

Users_Email:

Class instance

sendMessage

(
  • $subject
  • $view
  • $fields=array()
  • [$options=array()]
)
Bool

Send e-mail message

Parameters:

  • $subject String | Array

    The subject. May contain variable references to members of the $fields array. You can also pass an array($source, array($key1, ...)) to use Q_Text to obtain the subject.

  • $view String

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

  • $fields=array() Array

    The fields referenced in the subject and/or view

  • [$options=array()] Array optional

    Array of options. Can include:

    • [html=false] Array optional

      Whether to send as HTML email.

    • [name] Array optional

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

    • [from] Array optional

      An array of (emailAddress, humanReadableName)

    • [delay] Array optional

      A delay, in milliseconds, to wait until sending email. Only works if Node server is listening.

    • [language] String optional

      Preferred language

Returns:

Bool:

True if success or throw exception

setUp

()

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

Events

Users/email/sendMessage

Before

Event Payload:

  • subject String
  • view String
  • fields Array
  • options Array

Users/email/sendMessage

After

Event Payload:

  • subject String
  • view String
  • fields Array
  • options Array
  • mail String

Users/email/sendMessage/email

Before

Event Payload:

  • subject String
  • view String
  • fields Array
  • options Array
  • email Zend_Mail

    You can use this object's methods to add bcc and more.

Users/resend

Before

Event Payload:

  • user String
  • email String

Users/resend

After

Event Payload:

  • user String
  • email String