Manual:Hooks/UserMailerTransformContent

From MediaWiki.org
Jump to navigation Jump to search
UserMailerTransformContent
Available from version ???
Allow transformation of content, such as encrypting/signing
Define function:
public static function onUserMailerTransformContent( $to, $from, &$body, &$error ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UserMailerTransformContent": "MyExtensionHooks::onUserMailerTransformContent"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UserMailerTransformContent'][] = 'MyExtensionHooks::onUserMailerTransformContent';
Called from:File(s): UserMailer.php

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

Note[edit]

If returning false, the mail is not sent.

SeeAlso[edit]