* $wgUpgradeKey allows unlocking the web installer for upgrades without having
to move LocalSettings.php
* The FailFunction "error handling" method has now been removed
+* $wgAdditionalMailParams added to allow setting extra options to mail() calls.
=== New features in 1.17 ===
* (bug 10183) Users can now add personal styles and scripts to all skins via
*/
$wgSMTP = false;
+/**
+ * Additional email parameters, will be passed as the last argument to mail() call.
+ */
+$wgAdditionalMailParams = null;
+
/** For email notification on page changes */
$wgPasswordSender = $wgEmergencyContact;
*/
static function send( $to, $from, $subject, $body, $replyto=null, $contentType=null ) {
global $wgSMTP, $wgOutputEncoding, $wgEnotifImpersonal;
- global $wgEnotifMaxRecips;
+ global $wgEnotifMaxRecips, $wgAdditionalMailParams;
if ( is_array( $to ) ) {
// This wouldn't be necessary if implode() worked on arrays of
if (is_array($to)) {
foreach ($to as $recip) {
- $sent = mail( $recip->toString(), wfQuotedPrintable( $subject ), $body, $headers );
+ $sent = mail( $recip->toString(), wfQuotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams );
}
} else {
- $sent = mail( $to->toString(), wfQuotedPrintable( $subject ), $body, $headers );
+ $sent = mail( $to->toString(), wfQuotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams );
}
restore_error_handler();