#40139 [Fbk->Opn]: Mail command not returning true on success
| From: | sab2002a at yahoo dot com | Date: | Fri, 19 Jan 2007 17:05:50 +0000 |
| Subject: | #40139 [Fbk->Opn]: Mail command not returning true on success | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107780@lists.php.net to get a copy of this message | ||
ID: 40139
User updated by: sab2002a at yahoo dot com
Reported By: sab2002a at yahoo dot com
-Status: Feedback
+Status: Open
Bug Type: Mail related
Operating System: FreeBSD 5.4
PHP Version: 4.4.4
New Comment:
Yes, that's what I did as per my previous comment.
No errors at all, email gets sent, and I get a "An error occurred"
message.
Previous Comments:
------------------------------------------------------------------------
[2007-01-16 21:17:23] tony2001@php.net
set_error_reporting(E_ALL);
ini_set("display_errors", 1);
------------------------------------------------------------------------
[2007-01-16 19:20:07] sab2002a at yahoo dot com
I set error reporting and display errors on to max and still the same
thing.
I don't receive any error messages.
------------------------------------------------------------------------
[2007-01-15 20:40:02] tony2001@php.net
Set display_errors to On and error_reporting to E_ALL.
------------------------------------------------------------------------
[2007-01-15 20:31:17] sab2002a at yahoo dot com
Description:
------------
I have PHP setup as a CGI and am using qmail as my mail server.
When I use the mail() function, on success, I do not get a true return
on the function. I get no return.
On failure, I do get a false return.
Reproduce code:
---------------
<?php
if (!mail('email@address.com','test','test','From:
email@address.com'))
echo "An error occurred";
else
echo "no error occurred";
?>
Expected result:
----------------
Expect to see "no error occurred" and email sent.
Actual result:
--------------
The email gets sent but I get a "An error occurred" message.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40139&edit=1