MediaWiki master
MediaWiki\Mail\Hook\EmailUserSendEmailHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onEmailUserSendEmail (Authority $from, MailAddress $fromAddress, UserEmailContact $to, MailAddress $toAddress, string $subject, string $text, StatusValue $status)
 This hook is called before sending an email, when all other checks have succeeded.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "EmailUserSendEmail" to register handlers implementing this interface.

Stability: stable
to implement
Since
1.41

Definition at line 18 of file EmailUserSendEmailHook.php.

Member Function Documentation

◆ onEmailUserSendEmail()

MediaWiki\Mail\Hook\EmailUserSendEmailHook::onEmailUserSendEmail ( Authority $from,
MailAddress $fromAddress,
UserEmailContact $to,
MailAddress $toAddress,
string $subject,
string $text,
StatusValue $status )

This hook is called before sending an email, when all other checks have succeeded.

Parameters
Authority$from
MailAddress$fromAddressMailAddress of the sender
UserEmailContact$to
MailAddress$toAddressMailAddress of the target
string$subject
string$text
StatusValue$statusAdd any error here
Returns
bool|void True or no return value to continue. To abort, return false and add a fatal error to $status.

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: