从Wikibase Docker容器发送传出电子邮件

问题描述

我们已经在wikibase-docker前面安装了一个Apache服务器,以处理SSL并将两个虚拟主机代理到来自Docker的端口。

当我使用PasswordReset函数时,应该发送一封电子邮件。但相反,Wikibase容器仅记录sh: 1: -t: not found

解决方法

稍作搜索后,我发现可以在Wikibase容器中将MediaWiki配置选项$wgSMTP添加到LocalSettings.php中。

$wgSMTP = [
    'host'     => 'mail.example.com',// could also be an IP address. Where the SMTP server is located
    'IDHost'   => 'example.com',// Generally this will be the domain name of your website (aka mywiki.org)
    'port'     => 25,// Port to use when connecting to the SMTP server
    'auth'     => true,// Should we use SMTP authentication (true or false)
    'username' => 'my_user_name',// Username to use for SMTP authentication (if being used)
    'password' => 'my_password'       // Password to use for SMTP authentication (if being used)
];
docker cp wikibase-docker_wikibase_1:/var/www/html/w/LocalSettings.php LocalSettings.php
edit LocalSettings.php
docker cp LocalSettings.php wikibase-docker_wikibase_1:/var/www/html/w/LocalSettings.php

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...