这个问题整整困扰了我一周时间,其间光是快照回滚都操作了好几遍,也提交了阿里云的工单,甚至最终将系统升级到1.35.0都没解决。
不曾想今天无意当中竟然解决了。
当然中间到底是哪个环节起到了作用现在也没办法说清楚了,只是把各种可能性都写一遍吧。
在LocalSettings.php中加入如下代码:
$wgSMTP = [
'host' => 'ssl://smtp.qiye.aliyun.com', // could also be an IP address. Where the SMTP server is located
'IDHost' => "qiye.aliyun.com", // Generally this will be the domain name of your website (aka mywiki.org)
'port' => 465, // Port to use when connecting to the SMTP server
'auth' => true, // Should we use SMTP authentication (true or false)
'username' => 'elan@mindseed.cn', // Username to use for SMTP authentication (if being used)
'password' => 'mypassword' // Password to use for SMTP authentication (if being used)
];
这是我折腾了几天后的结果,确实发送成功也接受到了邮件。
注意:这里有一个坑就是host部分,其他几个系统如LimeSurvey或者是WordPress使用SMTP方式发送邮件都只需要填写smtp.qiye.aliyun.com
即可,但是在MediaWiki中则必须加上ssl://
前缀,否则的话就会提示无法连接。
另外,主机部分也可以填写阿里云邮件服务器老的域名,同样是可以收到邮件的。
$wgSMTP = [
'host' => 'ssl://smtp.mxhichina.com', // could also be an IP address. Where the SMTP server is located
'IDHost' => "mxhichina.com", // Generally this will be the domain name of your website (aka mywiki.org)
'port' => 465, // Port to use when connecting to the SMTP server
'auth' => true, // Should we use SMTP authentication (true or false)
'username' => 'elan@mindseed.cn', // Username to use for SMTP authentication (if being used)
'password' => 'mypassword' // Password to use for SMTP authentication (if being used)
];
结合官网以及其他网友的反馈来看,应该是需要安装Mail和Net_SMTP模块的,否则,就算是按上面的配置照样会报错。
pear install mail Net_SMTP