
Public Member Functions | |
| _clearAttachments ($userId) | |
| _handleAttachments ($userId) | |
| addPersistAttachment ($temporaryFile) | |
| assignParams ($paramArray=array()) | |
| clearRecipients ($clearHeaders=true) | |
| displayEditForm ($formActionUrl, $hiddenFormParams=null, $alternateTemplate=null, $additionalParameters=array()) | |
| getAddressFieldsEnabled () | |
| hasErrors () | |
| isEnabled () | |
| MailTemplate ($emailKey=null, $locale=null, $enableAttachments=null, $journal=null) | |
| & | processAddresses ($currentList, &$newAddresses) |
| send ($clearAttachments=true) | |
| sendWithParams ($paramArray) | |
| setAddressFieldsEnabled ($addressFieldsEnabled) | |
Definition at line 21 of file MailTemplate.inc.php.
| MailTemplate._clearAttachments | ( | $ | userId | ) |
Delete all attachments associated with this message. Called from send().
| $userId | int |
Definition at line 437 of file MailTemplate.inc.php.
References Request.getUserVar().
Referenced by send(), and ArticleMailTemplate.send().
| MailTemplate._handleAttachments | ( | $ | userId | ) |
Handles attachments in a generalized manner in situations where an email message must span several requests. Called from the constructor when attachments are enabled.
Definition at line 399 of file MailTemplate.inc.php.
References Request.getUser(), and Request.getUserVar().
Referenced by MailTemplate().
| MailTemplate.addPersistAttachment | ( | $ | temporaryFile | ) |
Adds a persistent attachment to the current list. Persistent attachments MUST be previously initialized with handleAttachments.
Definition at line 390 of file MailTemplate.inc.php.
| MailTemplate.assignParams | ( | $ | paramArray = array() |
) |
Assigns values to e-mail parameters.
| $paramArray | array |
Reimplemented in ArticleMailTemplate.
Definition at line 189 of file MailTemplate.inc.php.
References Request.getRequestedJournalPath(), Request.getSite(), and Request.url().
Referenced by sendWithParams().
| MailTemplate.clearRecipients | ( | $ | clearHeaders = true |
) |
Clears the recipient, cc, and bcc lists.
| $clearHeaders | boolean if true, also clear headers |
Definition at line 376 of file MailTemplate.inc.php.
References DataObject.setData().
| MailTemplate.displayEditForm | ( | $ | formActionUrl, | |
| $ | hiddenFormParams = null, |
|||
| $ | alternateTemplate = null, |
|||
| $ | additionalParameters = array() | |||
| ) |
Displays an edit form to customize the email.
| $formActionUrl | string | |
| $hiddenFormParams | array |
Definition at line 251 of file MailTemplate.inc.php.
References getAddressFieldsEnabled(), Mail.getFromString(), TemplateManager.getManager(), Request.getUser(), and Request.getUserVar().
| MailTemplate.getAddressFieldsEnabled | ( | ) |
Get the enabled/disabled state of address fields on the email form.
Definition at line 172 of file MailTemplate.inc.php.
Referenced by displayEditForm().
| MailTemplate.hasErrors | ( | ) |
Check whether or not there were errors in the user input for this form.
Definition at line 180 of file MailTemplate.inc.php.
| MailTemplate.isEnabled | ( | ) |
Returns true if the email template is enabled; false otherwise.
Definition at line 220 of file MailTemplate.inc.php.
| MailTemplate.MailTemplate | ( | $ | emailKey = null, |
|
| $ | locale = null, |
|||
| $ | enableAttachments = null, |
|||
| $ | journal = null | |||
| ) |
Constructor.
| $emailKey | string unique identifier for the template | |
| $locale | string locale of the template | |
| $enableAttachments | boolean optional Whether or not to enable article attachments in the template | |
| $journal | object optional The journal this message relates to |
Definition at line 61 of file MailTemplate.inc.php.
References _handleAttachments(), DAORegistry.getDAO(), Request.getJournal(), Locale.getLocale(), Request.getSite(), Request.getUser(), Request.getUserVar(), Config.getVar(), and processAddresses().
| & MailTemplate.processAddresses | ( | $ | currentList, | |
| &$ | newAddresses | |||
| ) |
Processes form-submitted addresses for inclusion in the recipient list
| $currentList | array Current recipient/cc/bcc list | |
| $newAddresses | array "Raw" form parameter for additional addresses |
Definition at line 230 of file MailTemplate.inc.php.
Referenced by MailTemplate().
| MailTemplate.send | ( | $ | clearAttachments = true |
) |
Send the email. Aside from calling the parent method, this actually attaches the persistent attachments if they are used.
| $clearAttachments | boolean Whether to delete attachments after |
Definition at line 302 of file MailTemplate.inc.php.
References _clearAttachments(), Mail.addAttachment(), Request.getUser(), and Config.getVar().
| MailTemplate.sendWithParams | ( | $ | paramArray | ) |
Assigns user-specific values to email parameters, sends the email, then clears those values.
| $paramArray | array |
Reimplemented in ArticleMailTemplate.
Definition at line 355 of file MailTemplate.inc.php.
References assignParams(), and Mail.send().
| MailTemplate.setAddressFieldsEnabled | ( | $ | addressFieldsEnabled | ) |
Disable or enable the address fields on the email form. NOTE: This affects the displayed form ONLY; if disabling the address fields, callers should manually clearAllRecipients and add/set recipients just prior to sending.
| $addressFieldsEnabled | boolean |
Definition at line 164 of file MailTemplate.inc.php.
1.5.6