Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -296,7 +296,10 @@ |
297 | 297 | $EditPage: the EditPage object |
298 | 298 | |
299 | 299 | 'AlternateUserMailer': Called before mail is sent so that mail could |
300 | | -be logged (or something else) instead of using PEAR or SMTP |
| 300 | +be logged (or something else) instead of using PEAR or PHP's mail(). |
| 301 | +Return false to skip the regular method of sending mail. Return a |
| 302 | +string to return a php-mail-error message containing the error. |
| 303 | +Returning true will continue with sending email in the regular way. |
301 | 304 | $headers: Associative array of headers for the email |
302 | 305 | $to: MailAddress object or array |
303 | 306 | $from: From address |
Index: trunk/phase3/includes/UserMailer.php |
— | — | @@ -192,10 +192,10 @@ |
193 | 193 | $headers['X-Mailer'] = 'MediaWiki mailer'; |
194 | 194 | $headers['From'] = $from->toString(); |
195 | 195 | |
196 | | - $ret = wfRunHooks( 'AlternateUserMailer', array( $headers, $to, $from, $subject, $body, $replyto, $contentType ) ); |
| 196 | + $ret = wfRunHooks( 'AlternateUserMailer', array( $headers, $to, $from, $subject, $body ) ); |
197 | 197 | if ( $ret === false ) { |
198 | 198 | return Status::newGood(); |
199 | | - } else if ( $ret != true ) { |
| 199 | + } else if ( $ret !== true ) { |
200 | 200 | return Status::newFatal( 'php-mail-error', $ret ); |
201 | 201 | } |
202 | 202 | |