Topic on Project:Support desk

Unable to send emails with MediaWiki

3
Faintaxis (talkcontribs)

Hi there,

I'm trying to get MediaWiki (v1.26.2) to send emails but it doesn't seem to work. Whenever it tries to send an email, I get the following error: "Mailer returned: authentication failure [SMTP: SMTP server does not support authentication (code: 250, response: server.name.here Hello [ip.addr.here] SIZE 36700160 PIPELINING DSN ENHANCEDSTATUSCODES 8BITMIME BINARYMIME CHUNKING)]"

I have the configuration in LocalSettings.php thus:

$wgSMTP = array(
 "host"     => 'mail.server.here', // could also be an IP address. Where the SMTP server is located
 "IDHost"   => 'domain.co.uk',      // Generally this will be the domain name of your website (aka mywiki.org)
 "port"     => 25,                 // Port to use when connecting to the SMTP server
 "username" => '',     // Username to use for SMTP authentication (if being used)''
 "password" => '',       // Password to use for SMTP authentication (if being used)''
 "auth"     => false               // Should we use SMTP authentication (true or false)
);

Unfortunately the server doesn't support authentication, though as you can see the auth setting is set to fale. However, MW doesn't seem to be honouring this and so I get the error above. I have Pear and Pear SMTP installed:

Installed packages, channel pear.php.net:
=========================================
Package          Version State
Archive_Tar      1.4.2   stable
Auth_SASL        1.0.6   stable
Console_Getopt   1.4.1   stable
Mail             1.2.0   stable
Mail_Mime        1.10.0  stable
Net_SMTP         1.6.1   stable
Net_Socket       1.0.14  stable
PEAR             1.10.1  stable
Structures_Graph 1.1.1   stable
XML_Util         1.3.0   stable

I've tried various settings both with username, password, different ports, auth turned on and off but the results are still the same. I'm at a loss. MW is running on Ubuntu and running PHP 5.3.

Ciencia Al Poder (talkcontribs)

That's very strange, because MediaWiki sends $wgSMTP directly to Pear Mail:

  $mail_object =& Mail::factory( 'smtp', $wgSMTP );

The error comes from Net_SMTP (source). But that auth() method is only called if the 'auth' value of $wgSMTP is not false (source).

I can only say, you should double-check that the LocalSettings.php file you're editing is the one being used by MediaWiki and that you aren't overwriting $wgSMTP somewhere else below that.

Faintaxis (talkcontribs)

This is exactly what I was thinking, but I even modified the DefaultSettings.php file to see if that could override it but no luck. I can't seem to find another LocalSettings.php file that it would be reading from - it's very confusing!

Reply to "Unable to send emails with MediaWiki"