php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5630 mail() function erroneously returns true
Submitted: 2000-07-16 22:48 UTC Modified: 2000-08-03 21:26 UTC
From: vvortex1 at home dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0.1pl2 OS: UNIX (FreeBSD)
Private report: No CVE-ID: None
 [2000-07-16 22:48 UTC] vvortex1 at home dot com
This bug was posted in the manual annotations more than a year ago, but it still isn't fixed. When the mail server reports an error, such as 550, the mail() function returns true. This is particularly problematic because it leaves no warning whatsoever that the message wasn't sent.

I'm on a shared host, so I don't have access to php.ini, but I can provide the results of phpinfo() if necessary. I was also able to reproduce the problem on my own system (Windows Me/Apache1.3.12/PHP4.0.1) and on a WindowsNT 4 SP6 partition with the same configuration.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-01 05:26 UTC] andi@php.net
Please change line 154 in php4/ext/standard/mail.c from:
if (ret == -1) {
to:
if (ret != 0) {
and let us know if this fixes your problem.
 [2000-08-03 21:26 UTC] hholzgra@php.net
 the unix version of mail will now check
the sendmail return code

 the windows version is still broken and
needs a rewrite badly, but this i'll put into
another bug report
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 05:01:31 2024 UTC