Index: trunk/phase3/includes/UserMailer.php |
— | — | @@ -55,16 +55,18 @@ |
56 | 56 | # PHP's mail() implementation under Windows is somewhat shite, and |
57 | 57 | # can't handle "Joe Bloggs <joe@bloggs.com>" format email addresses, |
58 | 58 | # so don't bother generating them |
59 | | - if ( $this->name != '' && !wfIsWindows() ) { |
60 | | - global $wgEnotifUseRealName; |
61 | | - $name = ( $wgEnotifUseRealName && $this->realName ) ? $this->realName : $this->name; |
62 | | - $quoted = UserMailer::quotedPrintable( $name ); |
63 | | - if ( strpos( $quoted, '.' ) !== false || strpos( $quoted, ',' ) !== false ) { |
64 | | - $quoted = '"' . $quoted . '"'; |
| 59 | + if ( $this->address ) { |
| 60 | + if ( $this->name != '' && !wfIsWindows() ) { |
| 61 | + global $wgEnotifUseRealName; |
| 62 | + $name = ( $wgEnotifUseRealName && $this->realName ) ? $this->realName : $this->name; |
| 63 | + $quoted = UserMailer::quotedPrintable( $name ); |
| 64 | + if ( strpos( $quoted, '.' ) !== false || strpos( $quoted, ',' ) !== false ) { |
| 65 | + $quoted = '"' . $quoted . '"'; |
| 66 | + } |
| 67 | + return "$quoted <{$this->address}>"; |
| 68 | + } else { |
| 69 | + return $this->address; |
65 | 70 | } |
66 | | - return "$quoted <{$this->address}>"; |
67 | | - } else { |
68 | | - return $this->address; |
69 | 71 | } |
70 | 72 | } |
71 | 73 | |