MediaWiki  1.28.0
MailAddress Class Reference

Stores a single person's name and email address. More...

Public Member Functions

 __construct ($address, $name=null, $realName=null)
 
 __toString ()
 
 toString ()
 Return formatted and quoted address to insert into SMTP headers. More...
 

Static Public Member Functions

static newFromUser (User $user)
 Create a new MailAddress object for the given user. More...
 

Detailed Description

Stores a single person's name and email address.

These are passed in via the constructor, and will be returned in SMTP header format when requested.

Definition at line 32 of file MailAddress.php.

Constructor & Destructor Documentation

MailAddress::__construct (   $address,
  $name = null,
  $realName = null 
)
Parameters
string$addressString with an email address, or a User object
string$nameHuman-readable name if a string address is given
string$realNameHuman-readable real name if a string address is given

Definition at line 38 of file MailAddress.php.

References $name, name, and wfDeprecated().

Member Function Documentation

MailAddress::__toString ( )

Definition at line 88 of file MailAddress.php.

References toString().

static MailAddress::newFromUser ( User  $user)
static
MailAddress::toString ( )

Return formatted and quoted address to insert into SMTP headers.

Returns
string

Definition at line 67 of file MailAddress.php.

References $name, $wgEnotifUseRealName, global, name, UserMailer\quotedPrintable(), and wfIsWindows().

Referenced by __toString(), and UserMailer\sendInternal().


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