Index: trunk/phase3/includes/UserMailer.php |
— | — | @@ -54,7 +54,11 @@ |
55 | 55 | */ |
56 | 56 | function toString() { |
57 | 57 | if( $this->name != '' ) { |
58 | | - return wfQuotedPrintable( $this->name ) . " <" . $this->address . ">"; |
| 58 | + $quoted = wfQuotedPrintable( $this->name ); |
| 59 | + if( strpos( $quoted, '.' ) !== false ) { |
| 60 | + $quoted = '"' . $quoted . '"'; |
| 61 | + } |
| 62 | + return "$quoted <{$this->address}>"; |
59 | 63 | } else { |
60 | 64 | return $this->address; |
61 | 65 | } |
— | — | @@ -80,10 +84,10 @@ |
81 | 85 | require_once( 'Mail.php' ); |
82 | 86 | |
83 | 87 | $timestamp = time(); |
84 | | - $dest = $to->toString(); |
| 88 | + $dest = $to->address; |
85 | 89 | |
86 | 90 | $headers['From'] = $from->toString(); |
87 | | - $headers['To'] = $dest; |
| 91 | + $headers['To'] = $to->toString(); |
88 | 92 | if ( $replyto ) { |
89 | 93 | $headers['Reply-To'] = $replyto; |
90 | 94 | } |
— | — | @@ -97,7 +101,7 @@ |
98 | 102 | |
99 | 103 | // Create the mail object using the Mail::factory method |
100 | 104 | $mail_object =& Mail::factory('smtp', $wgSMTP); |
101 | | - wfDebug( "Sending mail via PEAR::Mail to $dest" ); |
| 105 | + wfDebug( "Sending mail via PEAR::Mail to $dest\n" ); |
102 | 106 | $mailResult =& $mail_object->send($dest, $headers, $body); |
103 | 107 | |
104 | 108 | # Based on the result return an error string, |
Index: trunk/phase3/includes/SpecialConfirmemail.php |
— | — | @@ -49,7 +49,8 @@ |
50 | 50 | function showRequestForm() { |
51 | 51 | global $wgOut, $wgUser, $wgLang, $wgRequest; |
52 | 52 | if( $wgRequest->wasPosted() && $wgUser->matchEditToken( $wgRequest->getText( 'token' ) ) ) { |
53 | | - $message = $wgUser->sendConfirmationMail() ? 'confirmemail_sent' : 'confirmemail_sendfailed'; |
| 53 | + $ok = $wgUser->sendConfirmationMail(); |
| 54 | + $message = WikiError::isError( $ok ) ? 'confirmemail_sendfailed' : 'confirmemail_sent'; |
54 | 55 | $wgOut->addWikiText( wfMsg( $message ) ); |
55 | 56 | } else { |
56 | 57 | if( $wgUser->isEmailConfirmed() ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -461,7 +461,9 @@ |
462 | 462 | * (bug 5981) Add plural function Slovenian (sl) |
463 | 463 | * (bug 5945) Introduce {{CONTENTLANGUAGE}} magic word |
464 | 464 | * {{PLURAL}} can now take up to five forms |
| 465 | +* (bug 6243) Fix email for usernames containing dots when using PEAR::Mail |
465 | 466 | |
| 467 | + |
466 | 468 | == Compatibility == |
467 | 469 | |
468 | 470 | MediaWiki 1.7 requires PHP 5 (5.1 recommended). PHP 4 is no longer supported. |