Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / mail / Hook / EmailUserSendEmailHook.php
blob2c0bec5ea3bcf335454e1e9da960290ab244dcdc
1 <?php
3 namespace MediaWiki\Mail\Hook;
5 use MailAddress;
6 use MediaWiki\Mail\UserEmailContact;
7 use MediaWiki\Permissions\Authority;
8 use StatusValue;
10 /**
11 * This is a hook handler interface, see docs/Hooks.md.
12 * Use the hook name "EmailUserSendEmail" to register handlers implementing this interface.
14 * @stable to implement
15 * @ingroup Hooks
16 * @since 1.41
18 interface EmailUserSendEmailHook {
19 /**
20 * This hook is called before sending an email, when all other checks have succeeded.
22 * @param Authority $from
23 * @param MailAddress $fromAddress MailAddress of the sender
24 * @param UserEmailContact $to
25 * @param MailAddress $toAddress MailAddress of the target
26 * @param string $subject
27 * @param string $text
28 * @param StatusValue $status Add any error here
29 * @return bool|void True or no return value to continue. To abort, return false and add a fatal error to $status.
31 public function onEmailUserSendEmail(
32 Authority $from,
33 MailAddress $fromAddress,
34 UserEmailContact $to,
35 MailAddress $toAddress,
36 string $subject,
37 string $text,
38 StatusValue $status