Manual:Hooks/UserMailerTransformContent

Note
If returning false, the mail is not sent.