#15373 [Com]: mail() not working, no error with invalid SMTP or email address

From: Date: Sat, 01 Oct 2005 14:26:09 +0000
Subject: #15373 [Com]: 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-85848@lists.php.net to get a copy of this message
 ID:               15373
 Comment by:       morebiz at gmail dot com
 Reported By:      alonso at admintek dot net
 Status:           No Feedback
 Bug Type:         Mail related
 Operating System: win2000
 PHP Version:      4.2.1
 Assigned To:      mfischer
 New Comment:

Hi, 
I have problem like this too.
I try to change to windows 2003 server with php and it work. After I
install antivirus program, can not send mail.
So I just know the reason is Antivirus program !!!.
Now i new install Wins XP Apache+Php and config my antivirus program It
Work !!.
Please check your anivirus program.
Good luck.

Greeting from webmaster Thailand.


Previous Comments:
------------------------------------------------------------------------

[2003-12-19 12:31:03] georgealbert2001 at yahoo dot com

i have win98 and iam using devshed ,and i download easy SMTP
to make my PC an SMTP server
i always try to send mail but i fail
could someone tell me how to cofig to send the email

------------------------------------------------------------------------

[2003-11-16 18:59:02] doug32x at hotmail dot com

OS       Windows XP home Editio
Server   Apache 1.3.28
PHP      4.3.3

I tried doing this:
<?PHP 
ini_set('smtp_port','25');
mail("doug32x@hotmail.com","Hi","Message")
?> 

I get this: 
Warning: mail(): Failed to connect to mailserver at "localhost" port
25, verify your "SMTP" and "smtp_port" setting in php.ini or use
ini_set().

I tried by changin the php.ini and it does not work :(

I hope you can help me
Thanks a lot

------------------------------------------------------------------------

[2003-03-19 11:03:17] lucasnishimura at hotmail dot com

Anyone found a solution to this problem? if so please contact me at the
above email address..
thx in advance...

------------------------------------------------------------------------

[2002-10-14 19:26:49] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2002-09-21 10:12:22] mfischer@php.net

If I run my script through
http://snaps.php.net/win32/php4-win32-latest.zip
with

---8< php.ini ----
SMTP = 
sendmail_from = whoever
error_reporting = E_ALL
display_errors = On

and

----8< mail_15373.php----
<?php
	echo "Sending mail ...\n";

	$retval = mail("nouser", "subject", "body");

	var_dump($retval);
?>

I get

C:\php>cvsdebug\php -c . mail_15373.php
Sending mail ...

Warning: mail() [http://www.php.net/function.mail]: Failed to connect
to mailserver at "" port 25, verify your "SMTP" an
d "smtp_port" setting in php.ini or use ini_set() in mail_15373.php on
line 4
bool(false)

Same if I give some nonsense SMTP host:
C:\php>cvsdebug\php -c . mail_15373.php
Sending mail ...

Warning: mail() [http://www.php.net/function.mail]: Failed to connect
to mailserver at "acbsdflskadfasklfhas-asdfasdfs"
port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use
ini_set() in mail_15373.php on line 4
bool(false)

Please also test http://snaps.php.net/win32/php4-win32-latest.zip

------------------------------------------------------------------------

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


Thread (1 message)

  • morebiz at gmail dot com
  • Unknown Message
    • morebiz at gmail dot com
« previous php.bugs (#85848) next »