57 public function __construct( $address, $name =
null, $realName =
null ) {
59 $this->name = strval(
$name );
79 if ( !$this->address ) {
83 # PHP's mail() implementation under Windows is somewhat shite, and
84 # can't handle "Joe Bloggs <joe@bloggs.com>" format email addresses,
85 # so don't bother generating them
87 return $this->address;
92 $quoted = UserMailer::quotedPrintable(
$name );
94 if ( $quoted ===
$name ) {
95 $quoted =
'"' . addslashes( $quoted ) .
'"';
98 return "$quoted <{$this->address}>";
$wgEnotifUseRealName
Use real name instead of username in e-mail "from" field.
wfIsWindows()
Check if the operating system is Windows.
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)
Stable to call.
static newFromUser(User $user)
Create a new MailAddress object for the given user.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
getName()
Get the user name, or the IP of an anonymous user.
getRealName()
Get the user's real name.
getEmail()
Get the user's e-mail address.