【问题标题】:How can I send confirmation emails from MediaWiki to users?如何从 MediaWiki 向用户发送确认电子邮件?
【发布时间】:2023-03-14 22:37:01
【问题描述】:

我希望我的 wiki 能够向注册用户发送确认电子邮件(即:确认电子邮件地址)。 - 就这么简单

在我已安装的 Windows XP SP3 框中:

MediaWiki 版本:1.23.3
PHP版本:5.4.25(apache2handler)
MySql 版本:5.6.17-log

在同一台机器上,我从命令提示符 (CMD) 得到以下输出:

D:\www\php\pear> pear list

输出:

INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
========================================
PACKAGE VERSION STATE
Archive_Tar 1.3.12 stable
Auth_SASL 1.0.6 stable
Consoloe_Getopt 1.3.1 stable
Mail 1.2.0 stable
Net_SMTP 1.6.2 stable
Net_Socket 1.0.14 stable
PEAR 1.9.5 stable
Structures_Graph 1.0.4 stable
XML_Util 1.2.3 stable

在我的 LocalSettings.php 我有:

#SMTP setup
$wgSMTP = array(
'host' => "mydomain.com",
'port' => 25,
'auth' => true,
'username' => "user@mydomain.com",
'password' => "myPassword",
);

在我的 DefaultSettings.php 我有

$wgSMTP = false;

在我的 php.ini 中,我有:(请注意,开头带有 ';' (默认情况下))
;include_path = ".;c:\php\includes"

我的错误日志

(尝试发送用户电子邮件确认时的堆栈跟踪):

[e41daf7d] /wiki/index.php?title=Special:ConfirmEmail Exception from line 304 of
D:\www\Html\wiki\includes\UserMailer.php: PEAR mail package is not installedBacktrace:
#0 D:\www\Html\wiki\includes\User.php(3885): UserMailer::send(MailAddress, MailAddress, string, string, NULL)
#1 D:\www\Html\wiki\includes\User.php(3862): User->sendMail(string, string)
#2 D:\www\Html\wiki\includes\specials\SpecialConfirmemail.php(77): User->sendConfirmationMail()
#3 D:\www\Html\wiki\includes\specials\SpecialConfirmemail.php(58): EmailConfirmation->showRequestForm()
#4 D:\www\Html\wiki\includes\specialpage\SpecialPage.php(379): EmailConfirmation->execute(NULL)
#5 D:\www\Html\wiki\includes\specialpage\SpecialPageFactory.php(503): SpecialPage->run(NULL)
#6 D:\www\Html\wiki\includes\Wiki.php(285): SpecialPageFactory::executePath(Title, RequestContext)
#7 D:\www\Html\wiki\includes\Wiki.php(588): MediaWiki->performRequest()
#8 D:\www\Html\wiki\includes\Wiki.php(447): MediaWiki->main()
#9 D:\www\Html\wiki\index.php(46): MediaWiki->run()
#10 {main}

堆栈跟踪表明 PEAR Mail 包没有安装,当我清楚地收到这个包的 stable 状态时,正如我上面提到的那样......

我做错了什么? ...

-谢谢

【问题讨论】:

    标签: php email smtp mediawiki pear


    【解决方案1】:

    找到了!!!

    在我的 php.ini

    我将

    ;include_path = ".;c:\php\includes"

    行编辑为

    include_path = ".;c:\php\includes; c:\php\pear; d:\www\php\pear; d:\www\php\pear\pear"

    修复了它,现在我正在收到通知电子邮件... :)

    谢谢...

    【讨论】:

    • 我在 linux 上遇到了同样的问题。我该如何解决这个问题。我已经尝试过你提到的。不工作
    • 你能分享你的日志@bonez 吗?
    猜你喜欢
    • 1970-01-01
    • 2011-07-19
    • 1970-01-01
    • 1970-01-01
    • 2016-11-30
    • 1970-01-01
    • 2021-01-06
    • 2020-06-03
    • 2016-01-23
    相关资源
    最近更新 更多