< Manual:Hooks 
 
      | UserMailerTransformMessage | |
|---|---|
| Available from version 1.27.0 (Gerrit change 242791) Called in UserMailer::send()to change email after it has gone through the MIME transform. Extensions can block sending the email by returning false and setting $error. | |
| Define function: | public static function onUserMailerTransformMessage( array $to, MailAddress $from, &$subject, &$headers, &$body, &$error ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"UserMailerTransformMessage": "MyExtensionHooks::onUserMailerTransformMessage"
	}
}
 | 
| Called from: | File(s): UserMailer.php Function(s): sendInternal | 
| Interface: | UserMailerTransformMessageHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:UserMailerTransformMessage extensions.
Details
- $to: array of MailAddress objects of the targets
- $from: MailAddress of the sender
- &$subject: email subject (not MIME encoded)
- &$headers: email headers (except To: and Subject:) as an array of header name => value pairs
- &$body: email body (in MIME format) as a string
- &$error: should be set to an error message string, by default false
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.