Last modified: 2010-05-15 15:59:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 13276 - When using $wgSMTP, all send attempts return a code of 1, which MediaWiki sees as an error, but is not
When using $wgSMTP, all send attempts return a code of 1, which MediaWiki see...
Status: RESOLVED DUPLICATE of bug 11567
Product: MediaWiki
Classification: Unclassified
Email (Other open bugs)
1.11.x
PC Linux
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-06 20:38 UTC by Dan Pisarski
Modified: 2010-05-15 15:59 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dan Pisarski 2008-03-06 20:38:59 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.
Comment 1 Robert Leverington 2008-03-06 20:45:12 UTC
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.
Comment 2 Roan Kattouw 2008-03-06 20:49:31 UTC
(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
Comment 3 Brion Vibber 2008-03-06 21:03:57 UTC

*** This bug has been marked as a duplicate of bug 11567 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links