3 namespace MediaWiki\Hook
;
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "AlternateUserMailer" to register handlers implementing this interface.
11 * @stable to implement
14 interface AlternateUserMailerHook
{
16 * This hook is called before mail is sent so that mail could be logged
17 * (or something else) instead of using PEAR or PHP's mail().
21 * @param array $headers Associative array of headers for the email
22 * @param MailAddress|array $to To address
23 * @param MailAddress $from From address
24 * @param string $subject Subject of the email
25 * @param string $body Body of the message
26 * @return bool|string|void True or no return value to continue sending email in the
27 * regular way, or false to skip the regular method of sending mail. Return a string
28 * to return a php-mail-error message containing the error.
30 public function onAlternateUserMailer( $headers, $to, $from, $subject, $body );