Index: trunk/phase3/includes/User.php |
— | — | @@ -2957,12 +2957,13 @@ |
2958 | 2958 | */ |
2959 | 2959 | function sendMail( $subject, $body, $from = null, $replyto = null ) { |
2960 | 2960 | if( is_null( $from ) ) { |
2961 | | - global $wgPasswordSender; |
2962 | | - $from = $wgPasswordSender; |
| 2961 | + global $wgPasswordSender, $wgPasswordSenderName; |
| 2962 | + $sender = new MailAddress( $wgPasswordSender, $wgPasswordSenderName ); |
| 2963 | + } else { |
| 2964 | + $sender = new MailAddress( $from ); |
2963 | 2965 | } |
2964 | 2966 | |
2965 | 2967 | $to = new MailAddress( $this ); |
2966 | | - $sender = new MailAddress( $from ); |
2967 | 2968 | return UserMailer::send( $to, $sender, $subject, $body, $replyto ); |
2968 | 2969 | } |
2969 | 2970 | |
Index: trunk/phase3/includes/UserMailer.php |
— | — | @@ -440,7 +440,7 @@ |
441 | 441 | * @private |
442 | 442 | */ |
443 | 443 | function composeCommonMailtext() { |
444 | | - global $wgPasswordSender, $wgNoReplyAddress; |
| 444 | + global $wgPasswordSender, $wgPasswordSenderName, $wgNoReplyAddress; |
445 | 445 | global $wgEnotifFromEditor, $wgEnotifRevealEditorAddress; |
446 | 446 | global $wgEnotifImpersonal, $wgEnotifUseRealName; |
447 | 447 | |
— | — | @@ -496,7 +496,7 @@ |
497 | 497 | # global configuration level. |
498 | 498 | $editor = $this->editor; |
499 | 499 | $name = $wgEnotifUseRealName ? $editor->getRealName() : $editor->getName(); |
500 | | - $adminAddress = new MailAddress( $wgPasswordSender, 'WikiAdmin' ); |
| 500 | + $adminAddress = new MailAddress( $wgPasswordSender, $wgPasswordSenderName ); |
501 | 501 | $editorAddress = new MailAddress( $editor ); |
502 | 502 | if( $wgEnotifRevealEditorAddress |
503 | 503 | && ( $editor->getEmail() != '' ) |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -968,16 +968,21 @@ |
969 | 969 | * |
970 | 970 | * The address we should use as sender when a user is requesting his password. |
971 | 971 | */ |
972 | | -$wgPasswordSender = 'MediaWiki Mail <apache@' . $serverName . '>'; |
| 972 | +$wgPasswordSender = 'apache@' . $serverName; |
973 | 973 | |
974 | | -unset($serverName); # Don't leak local variables to global scope |
| 974 | +unset( $serverName ); # Don't leak local variables to global scope |
975 | 975 | |
976 | 976 | /** |
| 977 | + * Password reminder name |
| 978 | + */ |
| 979 | +$wgPasswordSenderName = 'MediaWiki Mail'; |
| 980 | + |
| 981 | +/** |
977 | 982 | * Dummy address which should be accepted during mail send action. |
978 | 983 | * It might be necessary to adapt the address or to set it equal |
979 | 984 | * to the $wgEmergencyContact address. |
980 | 985 | */ |
981 | | -$wgNoReplyAddress = 'reply@not.possible'; |
| 986 | +$wgNoReplyAddress = 'reply@not.possible'; |
982 | 987 | |
983 | 988 | /** |
984 | 989 | * Set to true to enable the e-mail basic features: |
— | — | @@ -1000,7 +1005,7 @@ |
1001 | 1006 | * which can cause problems with SPF validation and leak recipient addressses |
1002 | 1007 | * when bounces are sent to the sender. |
1003 | 1008 | */ |
1004 | | -$wgUserEmailUseReplyTo = false; |
| 1009 | +$wgUserEmailUseReplyTo = true; |
1005 | 1010 | |
1006 | 1011 | /** |
1007 | 1012 | * Minimum time, in hours, which must elapse between password reminder |
— | — | @@ -1033,9 +1038,6 @@ |
1034 | 1039 | */ |
1035 | 1040 | $wgAdditionalMailParams = null; |
1036 | 1041 | |
1037 | | -/** For email notification on page changes */ |
1038 | | -$wgPasswordSender = $wgEmergencyContact; |
1039 | | - |
1040 | 1042 | /** |
1041 | 1043 | * True: from page editor if s/he opted-in. False: Enotif mails appear to come |
1042 | 1044 | * from $wgEmergencyContact |
Index: trunk/phase3/includes/specials/SpecialEmailuser.php |
— | — | @@ -256,8 +256,8 @@ |
257 | 257 | // This is a bit ugly, but will serve to differentiate |
258 | 258 | // wiki-borne mails from direct mails and protects against |
259 | 259 | // SPF and bounce problems with some mailers (see below). |
260 | | - global $wgPasswordSender; |
261 | | - $mailFrom = new MailAddress( $wgPasswordSender ); |
| 260 | + global $wgPasswordSender, $wgPasswordSenderName; |
| 261 | + $mailFrom = new MailAddress( $wgPasswordSender, $wgPasswordSenderName ); |
262 | 262 | $replyTo = $from; |
263 | 263 | } else { |
264 | 264 | // Put the sending user's e-mail address in the From: header. |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -86,6 +86,8 @@ |
87 | 87 | * The FailFunction "error handling" method has now been removed |
88 | 88 | * $wgAdditionalMailParams added to allow setting extra options to mail() calls. |
89 | 89 | * $wgSecureLogin & $wgSecureLoginStickHTTPS to optionaly login using HTTPS |
| 90 | +* (bug 25728) Added $wgPasswordSenderName to allow customise the name associed |
| 91 | + with $wgPasswordSender |
90 | 92 | |
91 | 93 | === New features in 1.17 === |
92 | 94 | * (bug 10183) Users can now add personal styles and scripts to all skins via |