UserMailer Class Reference

Collection of static functions for sending mail. More...

List of all members.

Static Public Member Functions

static send ($to, $from, $subject, $body, $replyto=null, $contentType=null)
 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 errorHandler ($code, $string)
 Get the mail error message in global $wgErrorString.
static rfc822Phrase ($phrase)
 Converts a string into a valid RFC 822 "phrase", such as is used for the sender name.

Static Protected Member Functions

static sendWithPear ($mailer, $dest, $headers, $body)
 Send mail using a PEAR mailer.


Detailed Description

Collection of static functions for sending mail.

Definition at line 77 of file UserMailer.php.


Member Function Documentation

static UserMailer::errorHandler ( code,
string 
) [static]

Get the mail error message in global $wgErrorString.

Parameters:
$code Integer: error number
$string String: error message

Definition at line 231 of file UserMailer.php.

static UserMailer::rfc822Phrase ( phrase  )  [static]

Converts a string into a valid RFC 822 "phrase", such as is used for the sender name.

Definition at line 239 of file UserMailer.php.

Referenced by wfRFC822Phrase().

static UserMailer::send ( to,
from,
subject,
body,
replyto = null,
contentType = null 
) [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.

Parameters:
$to MailAddress: recipient's email
$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
Returns:
mixed True on success, a WikiError object on failure.

Definition at line 108 of file UserMailer.php.

References $dest, $endl, $u, $wgEnotifImpersonal, $wgEnotifMaxRecips, $wgOutputEncoding, $wgSMTP, WikiError::isError(), sendWithPear(), wfDebug(), wfIsWindows(), and wfQuotedPrintable().

Referenced by EmailUserForm::doSubmit(), EmailNotification::sendImpersonal(), User::sendMail(), EmailNotification::sendPersonalised(), and userMailer().

static UserMailer::sendWithPear ( mailer,
dest,
headers,
body 
) [static, protected]

Send mail using a PEAR mailer.

Definition at line 81 of file UserMailer.php.

References $dest, and wfDebug().

Referenced by send().


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

Generated on Sat Sep 5 02:08:50 2009 for MediaWiki by  doxygen 1.5.9