57 wfDeprecated( __METHOD__ .
' with a User object',
'1.24' );
58 $this->address =
$address->getEmail();
60 $this->realName =
$address->getRealName();
63 $this->name = strval( $name );
76 return new MailAddress( $user->getEmail(), $user->getName(), $user->getRealName() );
84 # PHP's mail() implementation under Windows is somewhat shite, and
85 # can't handle "Joe Bloggs <joe@bloggs.com>" format email addresses,
86 # so don't bother generating them
87 if ( $this->address ) {
92 if ( strpos( $quoted,
'.' ) !==
false || strpos( $quoted,
',' ) !==
false ) {
93 $quoted =
'"' . $quoted .
'"';
95 return "$quoted <{$this->address}>";
$wgEnotifUseRealName
Use real name instead of username in e-mail "from" field.
wfIsWindows()
Check if the operating system is Windows.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
Stores a single person's name and email address.
toString()
Return formatted and quoted address to insert into SMTP headers.
__construct( $address, $name=null, $realName=null)
static newFromUser(User $user)
Create a new MailAddress object for the given user.
static quotedPrintable( $string, $charset='')
Converts a string into quoted-printable format.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...