- default value of $wgEnotifImpersonal should be false
authorRiver Tarnell <river@users.mediawiki.org>
Sun, 6 May 2007 07:14:10 +0000 (07:14 +0000)
committerRiver Tarnell <river@users.mediawiki.org>
Sun, 6 May 2007 07:14:10 +0000 (07:14 +0000)
- userMailer() needs to handle multiple recips in mail() path

includes/DefaultSettings.php
includes/UserMailer.php

index 585b129..0dffa5d 100644 (file)
@@ -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.
index 32dee65..d800e82 100644 (file)
@@ -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 ) {