From:             parthsaha at gmail dot com
Operating system: Windows7
PHP version:      5.4.10
Package:          Mail related
Bug Type:         Bug
Bug description:Mail code shows mail sent but didn't receive any mail

Description:
------------
---
>From manual page:
http://www.php.net/function.mail#refsect1-function.mail-notes
---


I created a form which takes data (first & last name) from user and 

posts this data to the below PHP script (test script).


The code shows mail sent but I don't receive any mail.


For above, I used Localhost with PHP running and Internet connection
working.

Test script:
---------------
<html>
<body>

<?php

$fname=$_POST['firstname'];
$lname=$_POST['lastname'];

$msg='Hi' . $fname . $lname;
$to='parths...@gmail.com';
$subject='message from'.$from;

 $headers = "MIME-Version: 1.0" . "\r\n";
 $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
 $headers .= 'From: <webmas...@example.com>' . "\r\n";
 $headers .= 'Cc: myb...@example.com' . "\r\n";
 
if(mail($to,$subject,$msg,$headers)==true)
{
echo "mail sent";
}
else
{
echo "mail not sent";
}

echo "Thanks $fname .";
?> 

</body>
</html>


-- 
Edit bug report at https://bugs.php.net/bug.php?id=63981&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63981&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63981&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=63981&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63981&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63981&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63981&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63981&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63981&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63981&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63981&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=63981&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=63981&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63981&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63981&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63981&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63981&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63981&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63981&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63981&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63981&r=mysqlcfg

Reply via email to