Last modified: 2010-05-15 15:59:45 UTC
When using $wgSMTP on 1.11.1, and therefore using the Pear Mail::factory class, I noticed that all pages on MediaWiki say sending the email failed, reporting: Mailer returned: 1 But, the email goes through. I think (but am not sure not being a PHP expert) that this is as simple as the fact that Mail->send() in the Pear object returns "true" with success, and the corresponding MediaWiki function (line 155 of UserMailer.php, in the userMailer function) returns this value, and I am guessing the code above this expects a 0 as a no-error state. This was on CentOS, uname -a: Linux swrepos 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux Pear versions: Installed packages, channel pear.php.net: ========================================= Package Version State Archive_Tar 1.3.2 stable Console_Getopt 1.2.3 stable Mail 1.1.14 stable Net_SMTP 1.2.11 stable Net_Socket 1.0.8 stable PEAR 1.7.1 stable Structures_Graph 1.0.2 stable using a smtp server that requires no authentication.
All strings and positive integers (and some other variables) are equivilant to true (under normal circumstances) in PHP, therefore the value 1 is equal to true so this cannot be the problem.
(In reply to comment #1) > All strings and positive integers ... are equivalent to true IIRC, negative integers are also true. Only the integer 0 is cast to false. It is possible, of course, that a === test is used somewhere, which would fail: 1 !== true
*** This bug has been marked as a duplicate of bug 11567 ***