# For pages with many users watching, this can significantly reduce mail load.
# Has no effect when using sendmail rather than SMTP;
-$wgEnotifImpersonal = true;
+$wgEnotifImpersonal = false;
# Maximum number of users to mail at once when using impersonal mail. Should
# match the limit on your mail server.
$headers .= "{$endl}Reply-To: " . $replyto->toString();
}
- $dest = $to->toString();
-
$wgErrorString = '';
set_error_handler( 'mailErrorHandler' );
wfDebug( "Sending mail via internal mail() function to $dest\n" );
- mail( $dest, wfQuotedPrintable( $subject ), $body, $headers );
+
+ if (is_array($to))
+ foreach ($to as $recip)
+ mail( $recip->toString(), wfQuotedPrintable( $subject ), $body, $headers );
+ else
+ mail( $to->toString(), wfQuotedPrintable( $subject ), $body, $headers );
+
restore_error_handler();
if ( $wgErrorString ) {