* The FailFunction "error handling" method has now been removed
* $wgAdditionalMailParams added to allow setting extra options to mail() calls.
* $wgSecureLogin & $wgSecureLoginStickHTTPS to optionaly login using HTTPS
+* (bug 25728) Added $wgPasswordSenderName to allow customise the name associed
+ with $wgPasswordSender
=== New features in 1.17 ===
* (bug 10183) Users can now add personal styles and scripts to all skins via
*
* The address we should use as sender when a user is requesting his password.
*/
-$wgPasswordSender = 'MediaWiki Mail <apache@' . $serverName . '>';
+$wgPasswordSender = 'apache@' . $serverName;
-unset($serverName); # Don't leak local variables to global scope
+unset( $serverName ); # Don't leak local variables to global scope
+
+/**
+ * Password reminder name
+ */
+$wgPasswordSenderName = 'MediaWiki Mail';
/**
* Dummy address which should be accepted during mail send action.
* It might be necessary to adapt the address or to set it equal
* to the $wgEmergencyContact address.
*/
-$wgNoReplyAddress = 'reply@not.possible';
+$wgNoReplyAddress = 'reply@not.possible';
/**
* Set to true to enable the e-mail basic features:
* which can cause problems with SPF validation and leak recipient addressses
* when bounces are sent to the sender.
*/
-$wgUserEmailUseReplyTo = false;
+$wgUserEmailUseReplyTo = true;
/**
* Minimum time, in hours, which must elapse between password reminder
*/
$wgAdditionalMailParams = null;
-/** For email notification on page changes */
-$wgPasswordSender = $wgEmergencyContact;
-
/**
* True: from page editor if s/he opted-in. False: Enotif mails appear to come
* from $wgEmergencyContact
*/
function sendMail( $subject, $body, $from = null, $replyto = null ) {
if( is_null( $from ) ) {
- global $wgPasswordSender;
- $from = $wgPasswordSender;
+ global $wgPasswordSender, $wgPasswordSenderName;
+ $sender = new MailAddress( $wgPasswordSender, $wgPasswordSenderName );
+ } else {
+ $sender = new MailAddress( $from );
}
$to = new MailAddress( $this );
- $sender = new MailAddress( $from );
return UserMailer::send( $to, $sender, $subject, $body, $replyto );
}
* @private
*/
function composeCommonMailtext() {
- global $wgPasswordSender, $wgNoReplyAddress;
+ global $wgPasswordSender, $wgPasswordSenderName, $wgNoReplyAddress;
global $wgEnotifFromEditor, $wgEnotifRevealEditorAddress;
global $wgEnotifImpersonal, $wgEnotifUseRealName;
# global configuration level.
$editor = $this->editor;
$name = $wgEnotifUseRealName ? $editor->getRealName() : $editor->getName();
- $adminAddress = new MailAddress( $wgPasswordSender, 'WikiAdmin' );
+ $adminAddress = new MailAddress( $wgPasswordSender, $wgPasswordSenderName );
$editorAddress = new MailAddress( $editor );
if( $wgEnotifRevealEditorAddress
&& ( $editor->getEmail() != '' )
// This is a bit ugly, but will serve to differentiate
// wiki-borne mails from direct mails and protects against
// SPF and bounce problems with some mailers (see below).
- global $wgPasswordSender;
- $mailFrom = new MailAddress( $wgPasswordSender );
+ global $wgPasswordSender, $wgPasswordSenderName;
+ $mailFrom = new MailAddress( $wgPasswordSender, $wgPasswordSenderName );
$replyTo = $from;
} else {
// Put the sending user's e-mail address in the From: header.