Add UserMailerTransformX and UserMailerSplitTo hooks
authorGergő Tisza <gtisza@wikimedia.org>
Thu, 1 Oct 2015 03:05:23 +0000 (03:05 +0000)
committerGergő Tisza <tgr.huwiki@gmail.com>
Tue, 6 Oct 2015 20:31:13 +0000 (13:31 -0700)
commit4d7e8b44fbfcdc54c8e3571b2581fa63ae6821af
tree9709a0a6f82b60fc02eeb01a4cb2c15a12ab629b
parentd21c75418d856b06dcb6307c6f01ddda40f30b3c
Add UserMailerTransformX and UserMailerSplitTo hooks

UserMailerTransformContent allows extensions to change the body of
an email sent via UserMailer::send(). This is applied before
low-level transformations such as multipart or content encoding.

UserMailerTransformMessage is similar but it is run after those
transformations.

UserMailerSplitTo allows extensions to request that a certain
user should always be emailed separately (so when UserMailer::send()
is called with an array of target addresses, that user will be split
out into a separate call). This is intended for content
transformations which need to be different per user, such as
encryption.

A side effect is that while before a call to UserMailer::send() was
either fully succeeded or fully failed, now the message might be
delivered to some targets but not others. send() will return a failed
Status object in those cases.

Bug: T12453
Change-Id: I4c3a018110173c3b5d52a753fdcbec397b590ced
RELEASE-NOTES-1.27
docs/hooks.txt
includes/mail/UserMailer.php