From: thouraud at bondy dot ird dot fr
Operating system: solaris 9
PHP version: 4.3.3
PHP Bug Type: Mail related
Bug description: mail() always return FALSE

Description:
------------
The mail() function always return FALSE.
Even if the mail is sent !

Test with the sun's sendmail and postfix 2.0.16.
The mail can go out with no problem.

The result get the same safe_mode or not.

apache 1.3.28 with php as a module

Reproduce code:
---------------
<?php
$ret = mail ("userdomain.tld",
"sujet " . date("l dS of F Y h:i:s A"),
"corps\nl2\nl3\n",
"From: [email]userdomain.tld[/email]\r\n"
."Reply-To: [email]userdomain.tld[/email]\r\n"
) ;

print "ret = $ret<hr>" ;
if ($ret) {
print 'OK<br>' ;
} else {
print 'KO<br>' ;
}

?>


Expected result:
----------------
if we can send mail to [email]userdomain.tld[/email]
then OK and [email]userdomain.tld[/email] receive the mail.


if any error to sent mail
then KO and no mail !

Actual result:
--------------
always KO

but the mail are been received !

--
Edit bug report at [url]http://bugs.php.net/?id=25862&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25862&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25862&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25862&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25862&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25862&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25862&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25862&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25862&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25862&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25862&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25862&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25862&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25862&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25862&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25862&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=25862&r=float[/url]