* (bug 5981) Add plural function Slovenian (sl)
* (bug 5945) Introduce {{CONTENTLANGUAGE}} magic word
* {{PLURAL}} can now take up to five forms
+* (bug 6243) Fix email for usernames containing dots when using PEAR::Mail
+
== Compatibility ==
function showRequestForm() {
global $wgOut, $wgUser, $wgLang, $wgRequest;
if( $wgRequest->wasPosted() && $wgUser->matchEditToken( $wgRequest->getText( 'token' ) ) ) {
- $message = $wgUser->sendConfirmationMail() ? 'confirmemail_sent' : 'confirmemail_sendfailed';
+ $ok = $wgUser->sendConfirmationMail();
+ $message = WikiError::isError( $ok ) ? 'confirmemail_sendfailed' : 'confirmemail_sent';
$wgOut->addWikiText( wfMsg( $message ) );
} else {
if( $wgUser->isEmailConfirmed() ) {
*/
function toString() {
if( $this->name != '' ) {
- return wfQuotedPrintable( $this->name ) . " <" . $this->address . ">";
+ $quoted = wfQuotedPrintable( $this->name );
+ if( strpos( $quoted, '.' ) !== false ) {
+ $quoted = '"' . $quoted . '"';
+ }
+ return "$quoted <{$this->address}>";
} else {
return $this->address;
}
require_once( 'Mail.php' );
$timestamp = time();
- $dest = $to->toString();
+ $dest = $to->address;
$headers['From'] = $from->toString();
- $headers['To'] = $dest;
+ $headers['To'] = $to->toString();
if ( $replyto ) {
$headers['Reply-To'] = $replyto;
}
// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory('smtp', $wgSMTP);
- wfDebug( "Sending mail via PEAR::Mail to $dest" );
+ wfDebug( "Sending mail via PEAR::Mail to $dest\n" );
$mailResult =& $mail_object->send($dest, $headers, $body);
# Based on the result return an error string,