Manual:Hooks/UserMailerChangeReturnPath

From MediaWiki.org
Jump to navigation Jump to search
UserMailerChangeReturnPath
Available from version 1.24.0 (Gerrit change 138655)
Called to generate a VERP return address when UserMailer sends an email, with a bounce handling extension.
Define function:
public static function onUserMailerChangeReturnPath( $to, &$returnPath ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UserMailerChangeReturnPath": "MyExtensionHooks::onUserMailerChangeReturnPath"
	}
}

For MediaWiki ≤1.25:

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

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

Hook to generate custom variable envelope return path address (VERP address) for 'Return-Path'. Called to generate a VERP return address when UserMailer sends an email, with a bounce handling extension.

Details[edit]

  • $to: Array of MailAddress objects for the recipients
  • &$returnPath: The return address string

See also[edit]