From: River Tarnell Date: Sun, 6 May 2007 07:14:10 +0000 (+0000) Subject: - default value of $wgEnotifImpersonal should be false X-Git-Tag: 1.31.0-rc.0~53061 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=67044a931c9fb6549d7f45e23d0c82ae6fabe586;p=lhc%2Fweb%2Fwiklou.git - default value of $wgEnotifImpersonal should be false - userMailer() needs to handle multiple recips in mail() path --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 585b1291fb..0dffa5d1f4 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1180,7 +1180,7 @@ $wgEnotifMinorEdits = true; # UPO; false: "minor edits" on pages do not trigger # 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. diff --git a/includes/UserMailer.php b/includes/UserMailer.php index 32dee6574b..d800e82312 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -174,12 +174,16 @@ function userMailer( $to, $from, $subject, $body, $replyto=null ) { $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 ) {