|
MediaWiki
REL1_19
|
Collection of static functions for sending mail. More...
Static Public Member Functions | |
| static | arrayToHeaderString ($headers, $endl="\n") |
| Creates a single string from an associative array. | |
| static | errorHandler ($code, $string) |
| Set the mail error message in self::$mErrorString. | |
| static | makeMsgId () |
| Create a value suitable for the MessageId Header. | |
| static | quotedPrintable ($string, $charset= '') |
| Converts a string into quoted-printable format. | |
| static | rfc822Phrase ($phrase) |
| Converts a string into a valid RFC 822 "phrase", such as is used for the sender name. | |
| static | send ($to, $from, $subject, $body, $replyto=null, $contentType= 'text/plain;charset=UTF-8') |
| This function will perform a direct (authenticated) login to a SMTP Server to use for mail relaying if 'wgSMTP' specifies an array of parameters. | |
Static Public Attributes | |
| static | $mErrorString |
Static Protected Member Functions | |
| static | quotedPrintableCallback ($matches) |
| static | sendWithPear ($mailer, $dest, $headers, $body) |
| Send mail using a PEAR mailer. | |
Collection of static functions for sending mail.
Definition at line 84 of file UserMailer.php.
| static UserMailer::arrayToHeaderString | ( | $ | headers, |
| $ | endl = "\n" |
||
| ) | [static] |
Creates a single string from an associative array.
| $headers | Associative Array: keys are header field names, values are ... values. |
| $endl | String: The end of line character. Defaults to "\n" |
Definition at line 117 of file UserMailer.php.
Referenced by send().

| static UserMailer::errorHandler | ( | $ | code, |
| $ | string | ||
| ) | [static] |
Set the mail error message in self::$mErrorString.
| $code | Integer: error number |
| $string | String: error message |
Definition at line 331 of file UserMailer.php.
| static UserMailer::makeMsgId | ( | ) | [static] |
Create a value suitable for the MessageId Header.
Definition at line 129 of file UserMailer.php.
References $url, $wgServer, $wgSMTP, wfParseUrl(), and wfWikiID().
Referenced by send().


| static UserMailer::quotedPrintable | ( | $ | string, |
| $ | charset = '' |
||
| ) | [static] |
Converts a string into quoted-printable format.
Definition at line 349 of file UserMailer.php.
References $out.
Referenced by send(), GlobalTest\testQuotedPrintable(), and MailAddress\toString().

| static UserMailer::quotedPrintableCallback | ( | $ | matches | ) | [static, protected] |
Definition at line 369 of file UserMailer.php.
References $matches.
| static UserMailer::rfc822Phrase | ( | $ | phrase | ) | [static] |
Converts a string into a valid RFC 822 "phrase", such as is used for the sender name.
| $phrase | string |
Definition at line 340 of file UserMailer.php.
| static UserMailer::send | ( | $ | to, |
| $ | from, | ||
| $ | subject, | ||
| $ | body, | ||
| $ | replyto = null, |
||
| $ | contentType = 'text/plain; charset=UTF-8' |
||
| ) | [static] |
This function will perform a direct (authenticated) login to a SMTP Server to use for mail relaying if 'wgSMTP' specifies an array of parameters.
It requires PEAR:Mail to do that. Otherwise it just uses the standard PHP 'mail' function.
| $to | MailAddress: recipient's email (or an array of them) |
| $from | MailAddress: sender's email |
| $subject | String: email's subject. |
| $body | String: email's text. |
| $replyto | MailAddress: optional reply-to email (default: null). |
| $contentType | String: optional custom Content-Type (default: text/plain; charset=UTF-8) |
Definition at line 156 of file UserMailer.php.
References $wgAdditionalMailParams, $wgEnotifMaxRecips, $wgSMTP, arrayToHeaderString(), makeMsgId(), Status\newFatal(), Status\newGood(), quotedPrintable(), sendWithPear(), Fallback\stream_resolve_include_path(), wfDebug(), wfIniGetBool(), wfIsWindows(), wfRestoreWarnings(), wfRunHooks(), and wfSuppressWarnings().
Referenced by EmaillingJob\run(), EmailNotification\sendImpersonal(), User\sendMail(), EmailNotification\sendPersonalised(), and SpecialEmailUser\submit().


| static UserMailer::sendWithPear | ( | $ | mailer, |
| $ | dest, | ||
| $ | headers, | ||
| $ | body | ||
| ) | [static, protected] |
Send mail using a PEAR mailer.
| $mailer | |
| $dest | |
| $headers | |
| $body |
Definition at line 97 of file UserMailer.php.
References Status\newFatal(), Status\newGood(), and wfDebug().
Referenced by send().


UserMailer::$mErrorString [static] |
Definition at line 85 of file UserMailer.php.