|
@@ 225-231 (lines=7) @@
|
| 222 |
|
|
| 223 |
|
// Allow transformation of content, such as encrypting/signing |
| 224 |
|
$error = false; |
| 225 |
|
if ( !Hooks::run( 'UserMailerTransformContent', [ $to, $from, &$body, &$error ] ) ) { |
| 226 |
|
if ( $error ) { |
| 227 |
|
return Status::newFatal( 'php-mail-error', $error ); |
| 228 |
|
} else { |
| 229 |
|
return Status::newFatal( 'php-mail-error-unknown' ); |
| 230 |
|
} |
| 231 |
|
} |
| 232 |
|
|
| 233 |
|
/** |
| 234 |
|
* Forge email headers |
|
@@ 327-335 (lines=9) @@
|
| 324 |
|
} |
| 325 |
|
|
| 326 |
|
// allow transformation of MIME-encoded message |
| 327 |
|
if ( !Hooks::run( 'UserMailerTransformMessage', |
| 328 |
|
[ $to, $from, &$subject, &$headers, &$body, &$error ] ) |
| 329 |
|
) { |
| 330 |
|
if ( $error ) { |
| 331 |
|
return Status::newFatal( 'php-mail-error', $error ); |
| 332 |
|
} else { |
| 333 |
|
return Status::newFatal( 'php-mail-error-unknown' ); |
| 334 |
|
} |
| 335 |
|
} |
| 336 |
|
|
| 337 |
|
$ret = Hooks::run( 'AlternateUserMailer', [ $headers, $to, $from, $subject, $body ] ); |
| 338 |
|
if ( $ret === false ) { |