Open Journal Systems
3.3.0
|
Public Member Functions | |
__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 () | |
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) | |
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) | |
Static Public Member Functions | |
static | encodeDisplayName ($displayName, $send=false) |
Data Fields | |
$privateParams | |
Data Fields inherited from DataObject | |
$_data = array() | |
$_extractionAdaptersLoaded = false | |
$_hasLoadableAdapters = false | |
$_injectionAdaptersLoaded = false | |
$_metadataExtractionAdapters = array() | |
$_metadataInjectionAdapters = array() | |
Class defining basic operations for handling and sending emails.
Definition at line 23 of file Mail.inc.php.
Mail::__construct | ( | ) |
Constructor.
Reimplemented from DataObject.
Definition at line 33 of file Mail.inc.php.
References Config\getVar(), and setEnvelopeSender().
Mail::addAttachment | ( | $filePath, | |
$fileName = '' , |
|||
$contentType = '' , |
|||
$contentDisposition = 'attachment' |
|||
) |
Adds a file attachment to the email.
$filePath | string complete path to the file to attach |
$fileName | string attachment file name (optional) |
$contentType | string attachment content type (optional) |
$contentDisposition | string attachment content disposition, inline or attachment (optional, default attachment) |
Definition at line 261 of file Mail.inc.php.
References DataObject\getData(), PKPString\mime_content_type(), and DataObject\setData().
Mail::addBcc | ( | $email, | |
$name = '' |
|||
) |
Add a blind carbon copy (BCC) recipient to the message.
string | |
$name | optional |
Definition at line 162 of file Mail.inc.php.
References DataObject\getData(), and DataObject\setData().
Referenced by MailTemplate\send().
Mail::addCc | ( | $email, | |
$name = '' |
|||
) |
Add a carbon-copy (CC) recipient to the message.
string | |
$name | string optional |
Definition at line 132 of file Mail.inc.php.
References DataObject\getData(), and DataObject\setData().
Mail::addHeader | ( | $name, | |
$content | |||
) |
Add an SMTP header to the message.
$name | string |
$content | string |
Definition at line 217 of file Mail.inc.php.
References DataObject\getData(), and DataObject\setData().
Mail::addPrivateParam | ( | $name, | |
$value | |||
) |
Add a private parameter to this email. Private parameters are replaced just before sending and are never available via getBody etc.
Definition at line 46 of file Mail.inc.php.
Mail::addRecipient | ( | $email, | |
$name = '' |
|||
) |
Add a recipient.
string | |
$name | string optional |
Definition at line 63 of file Mail.inc.php.
References DataObject\getData(), and DataObject\setData().
Referenced by MassMail\send().
Mail::addReplyTo | ( | $email, | |
$name = '' |
|||
) |
Add a reply-to for the message.
string | |
$name | string optional |
Definition at line 336 of file Mail.inc.php.
References DataObject\getData(), and DataObject\setData().
Mail::clearAllRecipients | ( | ) |
Clear all recipients for this message (To, CC, and BCC).
Definition at line 206 of file Mail.inc.php.
References setBccs(), setCcs(), and setRecipients().
Referenced by MassMail\send().
|
static |
Encode a display name for proper inclusion with an email address.
$displayName | string |
$send | boolean True to encode the results for sending |
Definition at line 591 of file Mail.inc.php.
References PKPString\encode_mime_header(), and PKPString\regexp_match().
Referenced by getAddressArrayString(), and PKPSubmission\getAuthorEmails().
Mail::getAddressArrayString | ( | $addresses, | |
$includeNames = true , |
|||
$send = false |
|||
) |
Return a string from an array of (name, email) pairs.
$includeNames | boolean |
Definition at line 412 of file Mail.inc.php.
References encodeDisplayName().
Referenced by getBccString(), getCcString(), getRecipientString(), and getReplyToString().
& Mail::getAttachments | ( | ) |
Get the attachments currently on the message.
Definition at line 290 of file Mail.inc.php.
References DataObject\getData().
Referenced by hasAttachments(), and send().
Mail::getBccs | ( | ) |
Get the blind carbon copy (BCC) recipients for the message
Definition at line 175 of file Mail.inc.php.
References DataObject\getData().
Referenced by getBccString(), and send().
Mail::getBccString | ( | ) |
Return a string containing the Bcc recipients.
Definition at line 456 of file Mail.inc.php.
References getAddressArrayString(), and getBccs().
Referenced by SubmissionMailTemplate\log().
Mail::getBody | ( | ) |
Get the body of the message.
Definition at line 390 of file Mail.inc.php.
References DataObject\getData().
Referenced by SubmissionMailTemplate\log(), MailTemplate\replaceParams(), MassMail\send(), MailTemplate\send(), send(), SubmissionMailTemplate\sendWithParams(), and MailTemplate\sendWithParams().
Mail::getCcs | ( | ) |
Get the carbon-copy (CC) recipients for the message.
Definition at line 145 of file Mail.inc.php.
References DataObject\getData().
Referenced by getCcString(), promoteCcsIfNoRecipients(), and send().
Mail::getCcString | ( | ) |
Return a string containing the Cc recipients.
Definition at line 448 of file Mail.inc.php.
References getAddressArrayString(), and getCcs().
Referenced by SubmissionMailTemplate\log().
Mail::getContentType | ( | ) |
Get the message content type (MIME)
Definition at line 99 of file Mail.inc.php.
References DataObject\getData().
Referenced by send().
Mail::getEnvelopeSender | ( | ) |
Get the envelope sender (bounce address) for the message, if set. Override any set envelope sender if force_default_envelope_sender config option is in effect.
Definition at line 86 of file Mail.inc.php.
References DataObject\getData(), and Config\getVar().
Referenced by send().
Mail::getFrom | ( | ) |
Get the sender of the message.
Definition at line 317 of file Mail.inc.php.
References DataObject\getData().
Referenced by getFromString(), and send().
Mail::getFromString | ( | $send = false | ) |
Return a string containing the from address. Override any from address if force_default_envelope_sender config option is in effect.
Definition at line 399 of file Mail.inc.php.
References getFrom().
Referenced by SubmissionMailTemplate\log().
Mail::getHeaders | ( | ) |
Get the SMTP headers for the message.
Definition at line 242 of file Mail.inc.php.
References DataObject\getData().
Referenced by send(), and MailTemplate\sendWithParams().
Mail::getRecipients | ( | ) |
Get the recipients for the message.
Definition at line 115 of file Mail.inc.php.
References DataObject\getData().
Referenced by getRecipientString(), promoteCcsIfNoRecipients(), MassMail\send(), and send().
Mail::getRecipientString | ( | ) |
Return a string containing the recipients.
Definition at line 440 of file Mail.inc.php.
References getAddressArrayString(), and getRecipients().
Referenced by SubmissionMailTemplate\log().
Mail::getReplyTo | ( | ) |
Get the reply-to of the message.
Definition at line 350 of file Mail.inc.php.
References DataObject\getData().
Referenced by getReplyToString(), and send().
Mail::getReplyToString | ( | $send = false | ) |
Return a string containing the reply-to addresses.
Definition at line 358 of file Mail.inc.php.
References getAddressArrayString(), and getReplyTo().
Mail::getSubject | ( | ) |
Get the subject of the message.
Definition at line 374 of file Mail.inc.php.
References DataObject\getData().
Referenced by SubmissionMailTemplate\log(), MailTemplate\replaceParams(), MassMail\send(), send(), SubmissionMailTemplate\sendWithParams(), and MailTemplate\sendWithParams().
Mail::hasAttachments | ( | ) |
Return true iff attachments are included in this message.
Definition at line 299 of file Mail.inc.php.
References getAttachments().
Mail::promoteCcsIfNoRecipients | ( | ) |
If no recipients for this message, promote CC'd accounts to recipients. If recipients exist, no effect.
Definition at line 192 of file Mail.inc.php.
References getCcs(), getRecipients(), setCcs(), and setRecipients().
Mail::send | ( | ) |
Send the email.
Reimplemented in MailTemplate, and MassMail.
Definition at line 465 of file Mail.inc.php.
References HookRegistry\call(), PKPApplication\get(), getAttachments(), getBccs(), getBody(), getCcs(), getContentType(), getEnvelopeSender(), getFrom(), getHeaders(), getRecipients(), getReplyTo(), getSubject(), Config\getVar(), and PKPString\html2text().
Mail::setBccs | ( | $bccs | ) |
Set the blind carbon copy (BCC) recipients for the message.
$bccs | array |
Definition at line 183 of file Mail.inc.php.
References DataObject\setData().
Referenced by clearAllRecipients().
Mail::setBody | ( | $body | ) |
Set the body of the message.
$body | string |
Definition at line 382 of file Mail.inc.php.
References DataObject\setData().
Referenced by MailTemplate\__construct(), MailTemplate\replaceParams(), MassMail\send(), MailTemplate\send(), SubmissionMailTemplate\sendWithParams(), and MailTemplate\sendWithParams().
Mail::setCcs | ( | $ccs | ) |
Set the carbon-copy (CC) recipients for the message.
$ccs | array |
Definition at line 153 of file Mail.inc.php.
References DataObject\setData().
Referenced by clearAllRecipients(), and promoteCcsIfNoRecipients().
Mail::setContentType | ( | $contentType | ) |
Set the message content type (MIME)
$contentType | string |
Definition at line 107 of file Mail.inc.php.
References DataObject\setData().
Mail::setEnvelopeSender | ( | $envelopeSender | ) |
Set the envelope sender (bounce address) for the message, if supported.
$envelopeSender | string Email address |
Definition at line 77 of file Mail.inc.php.
References DataObject\setData().
Referenced by __construct(), and MailTemplate\send().
Mail::setFrom | ( | $email, | |
$name = '' |
|||
) |
Set the sender of the message.
string | |
$name | string optional |
Definition at line 309 of file Mail.inc.php.
References DataObject\setData().
Referenced by MailTemplate\__construct().
Mail::setHeaders | ( | & | $headers | ) |
Set the SMTP headers for the message.
$headers | array |
Definition at line 250 of file Mail.inc.php.
References DataObject\setData().
Referenced by MailTemplate\sendWithParams().
Mail::setPrivateParams | ( | $privateParams | ) |
Set the entire list of private parameters.
Definition at line 54 of file Mail.inc.php.
References $privateParams.
Mail::setRecipients | ( | $recipients | ) |
Set the recipients for the message.
$recipients | array |
Definition at line 123 of file Mail.inc.php.
References DataObject\setData().
Referenced by clearAllRecipients(), promoteCcsIfNoRecipients(), and MassMail\send().
Mail::setReplyTo | ( | $email, | |
$name = '' |
|||
) |
Set the reply-to of the message.
string or null to clear | |
$name | string optional |
Definition at line 326 of file Mail.inc.php.
References DataObject\setData().
Mail::setSubject | ( | $subject | ) |
Set the subject of the message.
$subject | string |
Definition at line 366 of file Mail.inc.php.
References DataObject\setData().
Referenced by MailTemplate\__construct(), MailTemplate\replaceParams(), MassMail\send(), SubmissionMailTemplate\sendWithParams(), and MailTemplate\sendWithParams().
array Mail::$privateParams |
List of key => value private parameters for this message
Definition at line 28 of file Mail.inc.php.
Referenced by setPrivateParams().