Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct ($emailKey=null, $locale=null, $context=null, $includeSignature=true) | |
assignParams ($params=array()) | |
clearRecipients ($clearHeaders=true) | |
getAddressFieldsEnabled () | |
hasErrors () | |
isEnabled () | |
manageURLValues ($targetString, $key, $value) | |
replaceParams () | |
send () | |
sendWithParams ($params) | |
setAddressFieldsEnabled ($addressFieldsEnabled) | |
Public Member Functions inherited from Mail | |
__construct () | |
addAttachment ($filePath, $fileName='', $contentType='', $contentDisposition='attachment') | |
addBcc ($email, $name='') | |
addCc ($email, $name='') | |
addHeader ($name, $content) | |
addPrivateParam ($name, $value) | |
addRecipient ($email, $name='') | |
addReplyTo ($email, $name='') | |
clearAllRecipients () | |
getAddressArrayString ($addresses, $includeNames=true, $send=false) | |
& | getAttachments () |
getBccs () | |
getBccString () | |
getBody () | |
getCcs () | |
getCcString () | |
getContentType () | |
getEnvelopeSender () | |
getFrom () | |
getFromString ($send=false) | |
getHeaders () | |
getRecipients () | |
getRecipientString () | |
getReplyTo () | |
getReplyToString ($send=false) | |
getSubject () | |
hasAttachments () | |
promoteCcsIfNoRecipients () | |
setBccs ($bccs) | |
setBody ($body) | |
setCcs ($ccs) | |
setContentType ($contentType) | |
setEnvelopeSender ($envelopeSender) | |
setFrom ($email, $name='') | |
setHeaders (&$headers) | |
setPrivateParams ($privateParams) | |
setRecipients ($recipients) | |
setReplyTo ($email, $name='') | |
setSubject ($subject) | |
Public Member Functions inherited from DataObject | |
addSupportedMetadataAdapter ($metadataAdapter) | |
extractMetadata ($metadataSchema) | |
getAdditionalMetadataFieldNames () | |
& | getAllData () |
getDAO () | |
& | getData ($key, $locale=null) |
getHasLoadableAdapters () | |
getId () | |
getLocaleMetadataFieldNames () | |
getLocalizedData ($key, $preferredLocale=null) | |
getMetadataFieldNames ($translated=true) | |
getSetMetadataFieldNames ($translated=true) | |
getSupportedExtractionAdapters () | |
getSupportedInjectionAdapters () | |
getSupportedMetadataSchemas () | |
hasData ($key, $locale=null) | |
injectMetadata ($metadataDescription) | |
removeSupportedMetadataAdapter ($metadataSchemaName) | |
setAllData (&$data) | |
setData ($key, $value, $locale=null) | |
setHasLoadableAdapters ($hasLoadableAdapters) | |
setId ($id) | |
unsetData ($key, $locale=null) | |
upcastTo ($targetObject) | |
Data Fields | |
$addressFieldsEnabled | |
$bccSender | |
$context | |
$emailKey | |
$enabled | |
$errorMessages | |
$includeSignature | |
$locale | |
$params | |
Data Fields inherited from Mail | |
$privateParams | |
Data Fields inherited from DataObject | |
$_data = array() | |
$_extractionAdaptersLoaded = false | |
$_hasLoadableAdapters = false | |
$_injectionAdaptersLoaded = false | |
$_metadataExtractionAdapters = array() | |
$_metadataInjectionAdapters = array() | |
Additional Inherited Members | |
Static Public Member Functions inherited from Mail | |
static | encodeDisplayName ($displayName, $send=false) |
Subclass of Mail for mailing a template email.
Definition at line 21 of file MailTemplate.inc.php.
MailTemplate::__construct | ( | $emailKey = null , |
|
$locale = null , |
|||
$context = null , |
|||
$includeSignature = true |
|||
) |
Constructor.
$emailKey | string unique identifier for the template |
$locale | string locale of the template |
$includeSignature | boolean optional |
Definition at line 82 of file MailTemplate.inc.php.
References $context, $emailKey, $includeSignature, $locale, PKPServices\get(), PKPApplication\get(), AppLocale\getLocale(), Mail\setBody(), Mail\setFrom(), and Mail\setSubject().
MailTemplate::assignParams | ( | $params = array() | ) |
Assigns values to e-mail parameters.
$params | array Associative array of variables to supply to the email template |
Reimplemented in SubmissionMailTemplate, and ArticleMailTemplate.
Definition at line 168 of file MailTemplate.inc.php.
References $application, $params, and PKPApplication\get().
Referenced by sendWithParams().
MailTemplate::clearRecipients | ( | $clearHeaders = true | ) |
Clears the recipient, cc, and bcc lists.
$clearHeaders | boolean if true, also clear headers |
Definition at line 291 of file MailTemplate.inc.php.
References DataObject\setData().
MailTemplate::getAddressFieldsEnabled | ( | ) |
Get the enabled/disabled state of address fields on the email form.
Definition at line 152 of file MailTemplate.inc.php.
References $addressFieldsEnabled.
MailTemplate::hasErrors | ( | ) |
Check whether or not there were errors in the user input for this form.
Definition at line 160 of file MailTemplate.inc.php.
MailTemplate::isEnabled | ( | ) |
Returns true if the email template is enabled; false otherwise.
Definition at line 208 of file MailTemplate.inc.php.
References $enabled.
MailTemplate::manageURLValues | ( | $targetString, | |
$key, | |||
$value | |||
) |
Finds and changes appropriately URL valued template parameter keys.
$targetString | string The string that contains the original {$key}s template variables |
$key | string The key we are looking for, and has an URL as its $value |
$value | string The value of the $key |
Definition at line 307 of file MailTemplate.inc.php.
Referenced by replaceParams().
MailTemplate::replaceParams | ( | ) |
Replace template variables in the message body.
$params | array Parameters to assign (augments anything provided via setParams) |
Definition at line 246 of file MailTemplate.inc.php.
References Mail\getBody(), Mail\getSubject(), manageURLValues(), Mail\setBody(), and Mail\setSubject().
Referenced by send().
MailTemplate::send | ( | ) |
Send the email.
Reimplemented from Mail.
Reimplemented in MassMail.
Definition at line 216 of file MailTemplate.inc.php.
References Mail\addBcc(), PKPApplication\get(), Mail\getBody(), Config\getVar(), replaceParams(), Mail\setBody(), and Mail\setEnvelopeSender().
Referenced by MassMail\send(), SubmissionMailTemplate\sendWithParams(), and sendWithParams().
MailTemplate::sendWithParams | ( | $params | ) |
Assigns user-specific values to email parameters, sends the email, then clears those values.
$params | array Associative array of variables to supply to the email template |
Reimplemented in SubmissionMailTemplate.
Definition at line 271 of file MailTemplate.inc.php.
References assignParams(), Mail\getBody(), Mail\getHeaders(), Mail\getSubject(), send(), Mail\setBody(), Mail\setHeaders(), and Mail\setSubject().
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 144 of file MailTemplate.inc.php.
References $addressFieldsEnabled.
boolean MailTemplate::$addressFieldsEnabled |
Whether or not email fields are disabled
Definition at line 68 of file MailTemplate.inc.php.
Referenced by getAddressFieldsEnabled(), and setAddressFieldsEnabled().
boolean MailTemplate::$bccSender |
whether or not to bcc the sender
Definition at line 62 of file MailTemplate.inc.php.
object MailTemplate::$context |
The context this message relates to
Definition at line 26 of file MailTemplate.inc.php.
Referenced by __construct().
string MailTemplate::$emailKey |
Key of the email template we are using
Definition at line 38 of file MailTemplate.inc.php.
Referenced by MassMail\__construct(), SubmissionMailTemplate\__construct(), and __construct().
boolean MailTemplate::$enabled |
email template is enabled
Definition at line 50 of file MailTemplate.inc.php.
Referenced by isEnabled().
array MailTemplate::$errorMessages |
List of errors to display to the user
Definition at line 56 of file MailTemplate.inc.php.
boolean MailTemplate::$includeSignature |
whether to include the context's signature
Definition at line 32 of file MailTemplate.inc.php.
Referenced by SubmissionMailTemplate\__construct(), and __construct().
string MailTemplate::$locale |
locale of this template
Definition at line 44 of file MailTemplate.inc.php.
Referenced by MassMail\__construct(), SubmissionMailTemplate\__construct(), and __construct().
array MailTemplate::$params |
The list of parameters to be assigned to the template.
Definition at line 74 of file MailTemplate.inc.php.
Referenced by assignParams().