Bug #15373 Updated: mail() not working, no error with invalid SMTP or email address
| From: | alonso at admintek dot net | Date: | Tue, 02 Jul 2002 16:39:12 +0000 |
| Subject: | Bug #15373 Updated: mail() not working, no error with invalid SMTP or email address | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12823@lists.php.net to get a copy of this message | ||
ID: 15373
Updated by: alonso@admintek.net
Reported By: alonso@admintek.net
-Status: Feedback
+Status: Open
Bug Type: Mail related
Operating System: win2000
PHP Version: 4.2.1
New Comment:
mfischer, I think you do not understand my situation.
I have in my php.ini:
SMTP = nothing-should-give-error; invalid SMTP
error_reporting = E_ALL;
display_errors = On ;
Then I have a script with:
//send mail with invalid STMP to invalid address
echo mail("noaddress","test","hola");
It immediately returns "1". Even with invalid SMTP and invalid email it
just says "1" no errors are reported. Then how am I supposed to test
my SMTP server if mail() always returns 1 and never sends the email? If
I use a correct SMTP and correct address it does the same thing.
I need to make it give some kind of error. Again, if I use php4ts.dll
and php4apache.dll from php4.0.6 it says "Bad Message destination" or
"Failed to Connect" if I put a valid address and keep the invalid SMTP.
With valid address and SMTP the email is sent correctly with 4.0.6.
Previous Comments:
------------------------------------------------------------------------
[2002-07-02 03:11:31] mfischer@php.net
You don't need to "use" the improved error reporting. It has improvied
in that way e.g. when the server returns an error response, you no
longer just get "server error" but the message string the server
'said'.
Are you sure you have error_reporting(E_ALL); so you see the warning
message if mail should generate one?
The only other way I could remotely see to debug this is that you tell
me what your SMTP is and you open it for me to relay so I can do
testings (we can do this in private mail of course).
------------------------------------------------------------------------
[2002-07-02 02:06:19] alonso@admintek.net
changed version from 4.1.1 to 4.2.1
------------------------------------------------------------------------
[2002-07-02 02:01:23] alonso@loquequeda.com
I have finally tested with php 4.2.1 and php4-win32-latest-zip and both
work the same. They do not send the email and always immediately return
1.
Script:
ini_set("SMTP","shouldfail");
echo mail("alonso@xxx.net","test","hola");
returns "1"
Using a correct SMTP also returns "1" and doesn't send the email. I
have found no way of sending the email except installing php 4.0.6
which does work.
You said "Error reporting has been improved", how do I use this
improved error reporting?
------------------------------------------------------------------------
[2002-06-02 13:52:28] mfischer@php.net
Error reporting has been improved, please try a snapshot from
http://snaps.php.net/win32/php4-win32-latest.zip
------------------------------------------------------------------------
[2002-02-06 18:54:55] mail@egri.de
Hy,
I have this problem too.
I can receiving email but i can´t sending with smtp.
The smtp server ist correct. I tryed any variations in the
config.php but it still doesn´t work.
My server is a Apache.
I have read in the phpinfo.php on my server that´s the with=smtp
registry not exist. So i have downloaded the
Ubeumiau-Php mail-script. It doesn´t work again. It was the same
problem.
PLEASE PLEASE HELP ME...
Greetings from Berlin
jam
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/15373
--
Edit this bug report at http://bugs.php.net/?id=15373&edit=1