I want to setup mail settings on Mediawiki. I am used Sparkpost for mail server. My Mediawiki system installed on Digital Ocean with Serverpilot. There my mail settings on Localsettings.php file.
$wgEnableEmail = True;
$wgEnableUserEmail = True; # UPO
$wgEmailAuthentication = True;
$wgSMTP = array(
'host' => "smtp.sparkpostmail.com", // could also be an IP address. Where the SMTP server is located
'IDHost' => "sitename.com", // Generally this will be the domain name of your website (aka mywiki.org)
'port' => 587, // Port to use when connecting to the SMTP server
'auth' => true, // Should we use SMTP authentication (true or false)
'username' => "SMTP_Injection", // Username to use for SMTP authentication (if being used)
'password' => "KEY" // Password to use for SMTP authentication (if being used)
);
It does not work that way. When i create account or password reset request, Mediawiki gives me an error:
[9d7926ea] /index.php?title=%C3%96zel:Kullan%C4%B1c%C4%B1OturumuA%C3%A7ma&action=submitlogin&type=signup&returnto=Ana+Sayfa MWException from line 268 of includes/mail/UserMailer.php: PEAR mail package is not installed
Backtrace:
#0 includes/User.php(4208): UserMailer::send(array, MailAddress, string, string, NULL)
#1 includes/User.php(4184): User->sendMail(string, string)
#2 includes/specials/SpecialUserlogin.php(409): User->sendConfirmationMail()
#3 includes/specials/SpecialUserlogin.php(314): LoginForm->addNewAccount()
#4 includes/specialpage/SpecialPage.php(384): LoginForm->execute(NULL)
#5 includes/specialpage/SpecialPageFactory.php(582): SpecialPage->run(NULL)
#6 includes/MediaWiki.php(267): SpecialPageFactory::executePath(Title, RequestContext)
#7 includes/MediaWiki.php(566): MediaWiki->performRequest()
#8 includes/MediaWiki.php(414): MediaWiki->main()
#9 index.php(41): MediaWiki->run()
#10 {main}
So, I check PEAR version on the terminal with that command: pear7.0-sp version
Output:
PEAR Version: 1.10.5
PHP Version: 7.0.27
Zend Engine Version: 3.0.0
Running on: Linux sitename.com 3.13.0-79-generic #123-Ubuntu SMP Fri Feb 19 14:27:58 UTC 2016 x86_64
Pear installed on my server. This problem about include path or PEAR mail package installation? What is your suggestion?
I've tried include path settings but it gives me error too. If the problem is related to this, how i can set that correctly? Thank you so much.