Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
MailTemplate Class Reference
Inheritance diagram for MailTemplate:
Mail DataObject MassMail SubmissionMailTemplate MonographMailTemplate

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, $context=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 ()
 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 ()
 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)

Public Attributes

- Public Attributes inherited from Mail
- Public Attributes inherited from DataObject
 $_data = array()
 $_extractionAdaptersLoaded = false
 $_hasLoadableAdapters = false
 $_injectionAdaptersLoaded = false
 $_metadataExtractionAdapters = array()
 $_metadataInjectionAdapters = array()

Detailed Description

Subclass of Mail for mailing a template email.

Definition at line 21 of file

Member Function Documentation

MailTemplate::_clearAttachments (   $userId)

Delete all attachments associated with this message. Called from send().


Definition at line 479 of file

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 441 of file

MailTemplate::addPersistAttachment (   $temporaryFile)

Adds a persistent attachment to the current list. Persistent attachments MUST be previously initialized with handleAttachments.

Definition at line 432 of file

References PKPRequest\getUser().

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

Assigns values to e-mail parameters.


Definition at line 223 of file

MailTemplate::clearRecipients (   $clearHeaders = true)

Clears the recipient, cc, and bcc lists.

$clearHeadersboolean if true, also clear headers

Definition at line 418 of file

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

Displays an edit form to customize the email.


Definition at line 289 of file

MailTemplate::getAddressFieldsEnabled ( )

Get the enabled/disabled state of address fields on the email form.


Definition at line 206 of file

MailTemplate::hasErrors ( )

Check whether or not there were errors in the user input for this form.

boolean true iff one or more error messages are stored.

Definition at line 214 of file

MailTemplate::isEnabled ( )

Returns true if the email template is enabled; false otherwise.


Definition at line 256 of file

MailTemplate::MailTemplate (   $emailKey = null,
  $locale = null,
  $enableAttachments = null,
  $context = null,
  $includeSignature = true 


$emailKeystring unique identifier for the template
$localestring locale of the template
$enableAttachmentsboolean optional Whether or not to enable article attachments in the template
$includeSignatureboolean optional

Definition at line 93 of file

References $context, and DAORegistry\getDAO().

& MailTemplate::processAddresses (   $currentList,

Processes form-submitted addresses for inclusion in the recipient list

$currentListarray Current recipient/cc/bcc list
$newAddressesarray "Raw" form parameter for additional addresses

Definition at line 266 of file

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 337 of file

MailTemplate::sendWithParams (   $paramArray)

Assigns user-specific values to email parameters, sends the email, then clears those values.


Definition at line 397 of file

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.


Definition at line 198 of file

Member Data Documentation

boolean MailTemplate::$addressFieldsEnabled

Whether or not email fields are disabled

Definition at line 84 of file

boolean MailTemplate::$bccSender

whether or not to bcc the sender

Definition at line 78 of file

object MailTemplate::$context

The context this message relates to

Definition at line 26 of file

Referenced by MailTemplate().

string MailTemplate::$emailKey

Key of the email template we are using

Definition at line 38 of file

Referenced by MassMail\MassMail(), and MonographMailTemplate\MonographMailTemplate().

boolean MailTemplate::$enabled

email template is enabled

Definition at line 50 of file

array MailTemplate::$errorMessages

List of errors to display to the user

Definition at line 56 of file

boolean MailTemplate::$includeSignature

whether to include the context's signature

Definition at line 32 of file

Referenced by MonographMailTemplate\MonographMailTemplate().

string MailTemplate::$locale

locale of this template

Definition at line 44 of file

Referenced by MassMail\MassMail(), and MonographMailTemplate\MonographMailTemplate().

array MailTemplate::$persistAttachments

List of temporary files belonging to email; these are maintained between requests and only sent to the attachment handling functions in at time of send.

Definition at line 64 of file

boolean MailTemplate::$skip

If set to true, this message has been skipped during the editing process by the user.

Definition at line 72 of file

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