#43348 [Fbk->Opn]: Mail function returns true but no email sent

From: Date: Tue, 20 Nov 2007 17:04:54 +0000
Subject: #43348 [Fbk->Opn]: Mail function returns true but no email sent
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-119896@lists.php.net to get a copy of this message
 ID:               43348
 User updated by:  RQuadling at GMail dot com
 Reported By:      RQuadling at GMail dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Mail related
 Operating System: Windows XP SP2
 PHP Version:      5.3CVS-2007-11-20 (snap)
 New Comment:

====C:\testmail.php====
<?php
ini_set('SMTP', 'gmail-smtp-in.l.google.com'); // Force GMail to be the
server.
$s_Email = 'RQuadling' . '@' . 'GMail.com';
var_dump(mail($s_Email, PHP_VERSION, 'Your message',
"From:$s_Email"));
?>

and then

C:\PHP4\PHP -n C:\testmail.php
I get 4.4.7-dev message

C:\PHP5\PHP -n C:\testmail.php
I get nothing.

V:\PHP5.2.2RC2-dev\PHP -n C:\testmail.php
I get 5.2.2RC2-dev message

Today, we made a change from McAfee AV to Symantec AV. I am getting
little alerts for PHP4 and the PHP5.2.2 messages going out, but nothing
for PHP5.3.0-dev


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

[2007-11-20 16:46:56] jani@php.net

It's pretty interesting since nothing has changed in this code between
those versions. And using the older one with exactly same line works?

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

[2007-11-20 14:58:47] RQuadling at GMail dot com

Description:
------------
Same script working on 

PHP 4.4.7-dev (cgi-fcgi) (built: Mar 25 2007 21:02:43)
PHP 5.2.2RC2-dev (cli) (built: Apr 18 2007 08:03:01)

but not on 

PHP 5.3.0-dev (cli) (built: Nov 20 2007 08:19:12)

Using Wireshark to see SMTP activity.

No errors, warnings or notices produced.

Script doesn't crash.

True is returned.

Running via the command line to remove all extensions and relying on
default configuration.

Obviously, you will need to change the SMTP server and email addresses
to see this in operation.


Reproduce code:
---------------
php -n -r "ini_set('SMTP', 'gmail-smtp-in.l.google.com');
var_dump(mail('RQuadling@GeeWhizzMail.com', 'Subject', 'Message',
'From:RQuadling@GeeWhizzMail.com'));"


Expected result:
----------------
True AND an email to be received.

Actual result:
--------------
True but no SMTP activity when monitored using WireShark.


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


-- 
Edit this bug report at http://bugs.php.net/?id=43348&edit=1


Thread (17 messages)

« previous php.bugs (#119896) next »