Manual:Hooks/EmailUserSendEmail
EmailUserSendEmail | |
---|---|
Available from version 1.41.0 (Gerrit change 922140) Called before sending an email, when all other checks have succeeded. | |
Define function: | public static function onEmailUserSendEmail(
MailAddress $fromAddress,
MediaWiki\Mail\UserEmailContact $to,
MailAddress $toAddress,
string $subject,
string $text,
StatusValue $status
MediaWiki\Permissions\Authority $from,
) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"EmailUserSendEmail": "MediaWiki\\Extension\\MyExtension\\Hooks::onEmailUserSendEmail"
}
}
|
Called from: | File(s): includes/mail/EmailUser.php |
Interface: | EmailUserSendEmailHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:EmailUserSendEmail extensions.