$emailer
$emailer :\apex\app\msg\emailer
Handles creating and managing the e-mail notifications within the system, including obtaining the lists of senders / recipients / available merge fields, and so on.
$emailer :\apex\app\msg\emailer
get_merge_vars(string $controller,integer $userid,array $data = array()): array
Get mrege variables for an e-mail notification
string | $controller | The e-mail notification controller |
integer | $userid | The ID# of the user, if appropriate |
array | $data | Any additional data passed when processing the e-mail notifications |
Returns a key-value pair of all merge variables
send(integer $userid,integer $notification_id,array $data)
Send a single notification
integer | $userid | The ID# of the user the e-mail is being sent against |
integer | $notification_id | The ID# of the notification to send |
array | $data | The $data array passed to the message::process_emails() function |
add_mass_queue(string $type,string $controller,string $message,string $subject = '',string $from_name = '',string $from_email = '',string $reply_to = '',array $condition = array())
Add a mass e-mailing to the queue
string | $type | The type of notification. Must be either 'email' or 'sms' |
string | $controller | The controller to user to gather the recipients. Defaults to 'users' |
string | $message | The contents of the message to send |
string | $subject | The subject of the e-mail message |
string | $from_name | The sender name of the e-mail message |
string | $from_email | The sender e-mail address of the e-mail message |
string | $reply_to | The reply-to e-mail address of the e-mail message |
array | $condition | An array containing the filter criteria defining which users to broadcast to. |