【发布时间】: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 STATEArchive_Tar 1.3.12 stableAuth_SASL 1.0.6 stableConsoloe_Getopt 1.3.1 stableMail 1.2.0 stableNet_SMTP 1.6.2 stableNet_Socket 1.0.14 stablePEAR 1.9.5 stableStructures_Graph 1.0.4 stableXML_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 ofD:\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