Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Hook; |
4 | |
5 | use MailAddress; |
6 | |
7 | /** |
8 | * This is a hook handler interface, see docs/Hooks.md. |
9 | * Use the hook name "AlternateUserMailer" to register handlers implementing this interface. |
10 | * |
11 | * @stable to implement |
12 | * @ingroup Hooks |
13 | */ |
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(). |
18 | * |
19 | * @since 1.35 |
20 | * |
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. |
29 | */ |
30 | public function onAlternateUserMailer( $headers, $to, $from, $subject, $body ); |
31 | } |