Manual:Hooks/UserMailerSplitTo

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
UserMailerSplitTo
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 242791)</tvar></translate>
Called in UserMailer::send() to give extensions a chance to split up an email with multiple of the To: field into separate emails.
<translate> Define function:</translate>
public static function onUserMailerSplitTo( array &$to ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"UserMailerSplitTo": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserMailerSplitTo"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> mail/UserMailer.php
<translate> Function(s):</translate> send
<translate> Interface:</translate> UserMailerSplitToHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:UserMailerSplitTo extensions</tvar>.</translate>


Details

  • &$to: array of MailAddress objects; unset the ones which should be mailed separately