Jump to content

手册:$wgPasswordSender

From mediawiki.org
This page is a translated version of the page Manual:$wgPasswordSender and the translation is 94% complete.
Outdated translations are marked like this.
电子邮件设置: $wgPasswordSender
密码提醒电子邮件地址。
引进版本:1.1.0
移除版本:仍在使用
允许的值:(字符串)
默认值:'apache@' 后跟 $wgServerName (1.5+)

详情

密码提醒电子邮件地址。 当用户请求密码时,用作的发件人的地址。 也用作其他电子邮件通知的发件人地址。

安装程序会自动为此设置生成一个值,并将其放在 LocalSettings.php 的顶部。 生成的值通常是无意义的(“apache@localhost”之类),因此如果 $wgPasswordSender 和 $wgEmergencyContact 不正确,请务必更改它们。 如果发件人地址不存在或与 $wgSMTP 中配置的用户名不匹配,某些 SMTP 服务器可能会拒绝将邮件发送给收件人。

格式

1.23 版本之后

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.

示例:

$wgPasswordSender = "example@example.com";

1.17 - 1.22

MediaWiki版本:
1.17 – 1.22

As of 1.17, the From: field in the email is constructed from this setting and $wgPasswordSenderName . Therefore this setting should contain just the email 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";

1.17 版本之前

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:

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

在 DefaultSettings.php 中的用法

请注意,从 v1.5.0 开始,DefaultSettings.php 中的默认值最初设置为与 1.4.x 中使用的值相同('Wikipedia' 在 v1.6.0 中更改为 'MediaWiki'),但不久后在 DefaultSettings.php 它被设置为 $wgEmergencyContact 的值,因此这个初始值永远不会出现(因此是上面的当前默认值)。 此信息在很大程度上是无关紧要的,但包含在此处是因为如果您正在浏览 DefaultSettings.php 以检查默认值,它可能会造成混淆。