![]() |
CMS
Version 3.9
|
Takes an email template and an obj of any DataItem class and sends email to a list of recipients after substituting merge codes for values from the obj. More...
Public Member Functions | |
EmailManager ($item, $emailTemplate, $onSendComplete="") | |
mergeEmail () | |
Use MergeCodeManager, which shares functionality with TextLookup. More... | |
getRecipients () | |
sendEmail () | |
sendOneEmail ($recipient) | |
Static Public Member Functions | |
static | registerTransport ($mode, $class) |
Registers an email transport handler. More... | |
static | createTransport ($mode=null) |
static | getTransportModes () |
static | registerSMTPTransport () |
static | registerSettingsFormExtension () |
static | settingsExtension ($form) |
static | send ($source, $name, $onSendComplete="") |
Sends an email template, based on the supplied DataItem (or array of DataItems) More... | |
static | setDefaults () |
static | upgradeComponent ($version) |
static | scanDebugLogs () |
static | registerSerializationHandler () |
Public Attributes | |
$emailTemplate | |
$item | |
$recipients | |
$message | |
$subject | |
$emailFrom | |
$emailName | |
The name of the email sender (optional) More... | |
$emailTemplateName | |
The name of the email template. More... | |
$onSendComplete | |
$attachments | |
optional - array of files to attach to the email More... | |
Static Public Attributes | |
static | $transports = null |
Takes an email template and an obj of any DataItem class and sends email to a list of recipients after substituting merge codes for values from the obj.
For example: message text "Dear [first_name]" becomes Dear John Smith
@item: obj of DataItem class that has the field values to be used in the email (e.g., user, program, order).
@emailTemplate: instance of DataItem EmailTemplate. This can be an instance constructed on the fly rather than retrieved from the db. If constructed, the following fields must be set: recipients subject message class_name
@onSendComplete: optional callback function to record the email that was sent in a log.
The following var are set in function mergeEmail after the MergeCodeManager performs the substitutions:
recipients subject message
Definition at line 393 of file email_manager.inc.
|
static |
string | $mode | (optional) the specific email transport required. Defaults to the selected email transport. |
Definition at line 417 of file email_manager.inc.
EmailManager::EmailManager | ( | $item, | |
$emailTemplate, | |||
$onSendComplete = "" |
|||
) |
Definition at line 471 of file email_manager.inc.
EmailManager::getRecipients | ( | ) |
Definition at line 520 of file email_manager.inc.
|
static |
Definition at line 433 of file email_manager.inc.
EmailManager::mergeEmail | ( | ) |
Use MergeCodeManager, which shares functionality with TextLookup.
Definition at line 508 of file email_manager.inc.
|
static |
Definition at line 702 of file email_manager.inc.
|
static |
Definition at line 448 of file email_manager.inc.
|
static |
Definition at line 443 of file email_manager.inc.
|
static |
Registers an email transport handler.
string | $mode | identifying mode name for the transport handler |
string | $class | name of the class providing the transport. This must derive from AbstractEmailTransport |
Definition at line 402 of file email_manager.inc.
|
static |
Definition at line 669 of file email_manager.inc.
|
static |
Sends an email template, based on the supplied DataItem (or array of DataItems)
mixed | $source | either a single DataItem, or an array of DataItems |
string | $name | the identifier of the email template |
callable | $onSendComplete | callback handler to be called after all generated emails have been sent |
Definition at line 593 of file email_manager.inc.
EmailManager::sendEmail | ( | ) |
Definition at line 550 of file email_manager.inc.
EmailManager::sendOneEmail | ( | $recipient | ) |
Definition at line 569 of file email_manager.inc.
|
static |
Definition at line 626 of file email_manager.inc.
|
static |
Definition at line 453 of file email_manager.inc.
|
static |
Definition at line 659 of file email_manager.inc.
EmailManager::$attachments |
optional - array of files to attach to the email
Definition at line 469 of file email_manager.inc.
EmailManager::$emailFrom |
Definition at line 465 of file email_manager.inc.
EmailManager::$emailName |
The name of the email sender (optional)
Definition at line 466 of file email_manager.inc.
EmailManager::$emailTemplate |
Definition at line 460 of file email_manager.inc.
EmailManager::$emailTemplateName |
The name of the email template.
Definition at line 467 of file email_manager.inc.
EmailManager::$item |
Definition at line 461 of file email_manager.inc.
EmailManager::$message |
Definition at line 463 of file email_manager.inc.
EmailManager::$onSendComplete |
Definition at line 468 of file email_manager.inc.
EmailManager::$recipients |
Definition at line 462 of file email_manager.inc.
EmailManager::$subject |
Definition at line 464 of file email_manager.inc.
|
static |
Definition at line 395 of file email_manager.inc.