David
David

Reputation: 1569

How can I send confirmation emails from MediaWiki to users?

I want my wiki to be able to send confirmation e-mails (i.e: Confirm e-mail address) to registered users. - that simple

In my Windows XP SP3 box I have installed:

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

In the same machine I get the following output from command-prompt (CMD) :

D:\www\php\pear> pear list

Output:

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

In my LocalSettings.php I have:

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

In my DefaultSettings.php I have

$wgSMTP = false;

In my php.ini I have : (note that is comented with ';' at the beginning (this by default))
;include_path = ".;c:\php\includes"

My Error Log

(stacktrace when attempting to send user e-mail confirmation):

[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}

The stacktrace suggests that the PEAR Mail package is not installed, when clearly I receive a status of stable for this package as I mentioned above too ...

What am I doing wrong? ...

-Thanks

Upvotes: 0

Views: 1927

Answers (1)

David
David

Reputation: 1569

Found it !!!

In my php.ini

I edited the line

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

to be

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

That fixed it and now I am receiving notification e-mails ... :)

Thank you ...

Upvotes: 1

Related Questions