Manual:Hooks/EmailUserCC

From MediaWiki.org
Jump to navigation Jump to search
EmailUserCC
Available from version 1.17.0 (r64903)
Occurs before sending the copy of the email to the author
Define function:
public static function onEmailUserCC( &$to, &$from, &$subject, &$text ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"EmailUserCC": "MyExtensionHooks::onEmailUserCC"
	}
}

For MediaWiki ≤1.25:

$wgHooks['EmailUserCC'][] = 'MyExtensionHooks::onEmailUserCC';
Called from:File(s): SpecialEmailuser.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:EmailUserCC extensions.

Details[edit]

  • $to: MailAddress of receiving user
  • $from: MailAddress of sending user
  • $subject: subject of the mail
  • $text: text of the mail

See also[edit]