59 public function __construct( $address, $name =
null, $realName =
null ) {
61 $this->name = strval(
$name );
81 if ( !$this->address ) {
85 # PHP's mail() implementation under Windows is somewhat shite, and
86 # can't handle "Joe Bloggs <joe@bloggs.com>" format email addresses,
87 # so don't bother generating them
89 return $this->address;
94 $quoted = UserMailer::quotedPrintable(
$name );
96 if ( $quoted ===
$name ) {
97 $quoted =
'"' . addslashes( $quoted ) .
'"';
100 return "$quoted <{$this->address}>";
wfIsWindows()
Check if the operating system is Windows.
Stores a single person's name and email address.
static newFromUser(UserEmailContact $user)
Create a new MailAddress object for the given user.
toString()
Return formatted and quoted address to insert into SMTP headers.
__construct( $address, $name=null, $realName=null)
$wgEnotifUseRealName
Config variable stub for the EnotifUseRealName setting, for use by phpdoc and IDEs.