Open Journal Systems  2.4.8
 All Classes Namespaces Functions Variables Groups Pages
MailTemplate Class Reference
Inheritance diagram for MailTemplate:
PKPMailTemplate Mail DataObject ArticleMailTemplate MassMail

Public Member Functions

 assignParams ($paramArray=array())
 displayEditForm ($formActionUrl, $hiddenFormParams=null, $alternateTemplate=null, $additionalParameters=array())
 MailTemplate ($emailKey=null, $locale=null, $enableAttachments=null, $journal=null, $includeSignature=true, $ignorePostedData=false)
 send ($clearAttachments=true)
- Public Member Functions inherited from PKPMailTemplate
 _clearAttachments ($userId)
 _handleAttachments ($userId)
 addPersistAttachment ($temporaryFile)
 assignParams ($paramArray=array())
 clearRecipients ($clearHeaders=true)
 displayEditForm ($formActionUrl, $hiddenFormParams=null, $alternateTemplate=null, $additionalParameters=array())
 getAddressFieldsEnabled ()
 hasErrors ()
 isEnabled ()
 PKPMailTemplate ($emailKey=null, $locale=null, $enableAttachments=null, $includeSignature=true)
processAddresses ($currentList, &$newAddresses)
 send ($clearAttachments=true)
 sendWithParams ($paramArray)
 setAddressFieldsEnabled ($addressFieldsEnabled)
- Public Member Functions inherited from Mail
 addAttachment ($filePath, $fileName= '', $contentType= '', $contentDisposition= 'attachment')
 addBcc ($email, $name= '')
 addCc ($email, $name= '')
 addHeader ($name, $content)
 addPrivateParam ($name, $value)
 addRecipient ($email, $name= '')
 clearAllRecipients ()
 encodeDisplayName ($displayName, $send=false)
 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 ()
 Mail ()
 promoteCcsIfNoRecipients ()
 send ()
 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)
 DataObject ($callHooks=true)
extractMetadata (&$metadataSchema)
 getAdditionalMetadataFieldNames ()
getAllData ()
getData ($key, $locale=null)
 getHasLoadableAdapters ()
 getId ()
 getLocaleMetadataFieldNames ()
getLocalizedData ($key)
 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)
upcastTo (&$targetObject)

Additional Inherited Members

- Public Attributes inherited from DataObject
 $_data = array()

Detailed Description

Subclass of PKPMailTemplate for mailing a template email.

Definition at line 18 of file

Member Function Documentation

MailTemplate::assignParams (   $paramArray = array())

Assigns values to e-mail parameters.


Definition at line 112 of file

References Request\getRequestedJournalPath(), PKPRequest\getSite(), and Request\url().

MailTemplate::displayEditForm (   $formActionUrl,
  $hiddenFormParams = null,
  $alternateTemplate = null,
  $additionalParameters = array() 

Displays an edit form to customize the email.


Definition at line 133 of file

MailTemplate::MailTemplate (   $emailKey = null,
  $locale = null,
  $enableAttachments = null,
  $journal = null,
  $includeSignature = true,
  $ignorePostedData = false 


$emailKeystring unique identifier for the template
$localestring locale of the template
$enableAttachmentsboolean optional Whether or not to enable article attachments in the template
$journalobject optional The journal this message relates to
$includeSignatureboolean optional
$ignorePostedDataboolean optional

Definition at line 31 of file

References Mail\getBccs(), Mail\getCcs(), DAORegistry\getDAO(), Request\getJournal(), Mail\getRecipients(), PKPRequest\getSite(), Mail\getSubject(), PKPRequest\getUser(), PKPRequest\getUserVar(), PKPMailTemplate\processAddresses(), Mail\setBccs(), Mail\setBody(), Mail\setCcs(), Mail\setFrom(), Mail\setRecipients(), Mail\setReplyTo(), and Mail\setSubject().

MailTemplate::send (   $clearAttachments = true)

Send the email. Aside from calling the parent method, this actually attaches the persistent attachments if they are used.

$clearAttachmentsboolean Whether to delete attachments after

Definition at line 146 of file

References Mail\getBody(), Config\getVar(), Mail\setBody(), and Mail\setEnvelopeSender().

The documentation for this class was generated from the following file: