Podręcznik:$wgPasswordSender

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgPasswordSender and the translation is 23% complete.

Other languages:
English • ‎español • ‎فارسی • ‎français • ‎italiano • ‎日本語 • ‎polski • ‎português • ‎português do Brasil
Email settings: $wgPasswordSender
Password reminder email address.
Wprowadzono w wersji: 1.1.0
Usunięto w wersji: nadal w użyciu
Dozwolone wartości: string
Domyślna wartość: 'apache@' followed by the host portion of $wgServerManual:$wgServer

Inne ustawienia: Alfabetycznie | Według funkcji

Szczegóły

Password reminder email address. The address we should use as sender when a user is requesting a password. Also used as the sender address for other email notifications.

The installer automatically generates a value for this setting, and places it towards the top of LocalSettings.php. The generated value will often be nonsensical ("apache@localhost" or similar), so be sure to change $wgPasswordSender and $wgEmergencyContactManual:$wgEmergencyContact if they are incorrect. Some SMTP servers may refuse to send the mail to the recipients if the sender address does not exist or does not match the username configured in $wgSMTPManual:$wgSMTP.

Format

1.23 onwards

Wersja MediaWiki: 1.23

In MediaWiki 1.23, $wgPasswordSenderName has been removed (see there for more information). $wgPasswordSender however can and should still be used. After setting the email address in LocalSettings.php, you can optionally edit the wiki page MediaWiki:Emailsender to specify a "friendly name" for the password sender.

Example:

$wgPasswordSender = "example@example.com";

1.17 to 1.22

Wersje MediaWiki: 1.17 – 1.22

As of 1.17, the From: field in the e-mail is constructed from this setting and $wgPasswordSenderName. Therefore this setting should contain just the e-mail address (as per the first example, above). If it is in any other format then it will mangle the From: field. Here is an example of specifying a friendly name for the password sender:

$wgPasswordSender     = "example@example.com";
$wgPasswordSenderName = "Wiki Administrator";

Pre 1.17

Wersja MediaWiki: 1.16

Prior to 1.17 this setting was used as the literal string to use for the From: field, therefore anything that is valid in that field is allowed here. The above example could be achieved by using a special syntax, as shown below.

The most common use-cases were:

  • E-mail address: "admin@example.com"
  • E-mail address with alternative display name: "Wiki Administrator <admin@example.com>"

Użycie w DefaultSettings.php

Note that from v1.5.0 upwards, the default value in DefaultSettings.php is initially set to the same value as was used in 1.4.x (with 'Wikipedia' changed to 'MediaWiki' in v1.6.0) but this is overridden later in DefaultSettings.php where it sets it to the value of $wgEmergencyContactManual:$wgEmergencyContact, so this initial value is never seen (hence the current default value, above). This information is largely irrelevant, but is included here because it can cause confusion if you are browsing DefaultSettings.php to check the default value.