Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / mail / Hook / AlternateUserMailerHook.php
blob1d8476572ef1fd63492e5f6d31efd3453f22b971
1 <?php
3 namespace MediaWiki\Hook;
5 use MailAddress;
7 /**
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
12 * @ingroup Hooks
14 interface AlternateUserMailerHook {
15 /**
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().
19 * @since 1.35
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 );