Index: includes/UserMailer.php =================================================================== --- includes/UserMailer.php (revision 111796) +++ includes/UserMailer.php (working copy) @@ -170,15 +170,14 @@ } if ( count( $dest ) == 0 ) { return Status::newFatal( 'user-mail-no-addy' ); + } elseif ( count( $dest ) == 1 ) { + $dest = array( $dest[0] ); + } else { + $dest = array( 'undisclosed-recipients:;' ); } $headers['From'] = $from->toString(); $headers['Return-Path'] = $from->address; - if ( count( $to ) == 1 ) { - $headers['To'] = $to[0]->toString(); - } else { - $headers['To'] = 'undisclosed-recipients:;'; - } if ( $replyto ) { $headers['Reply-To'] = $replyto->toString(); @@ -201,6 +200,8 @@ } if ( is_array( $wgSMTP ) ) { + $headers['Subject'] = self::quotedPrintable( $subject ); + if ( function_exists( 'stream_resolve_include_path' ) ) { $found = stream_resolve_include_path( 'Mail.php' ); } else {