Edit report at https://bugs.php.net/bug.php?id=63981&edit=1
ID: 63981 Updated by: a...@php.net Reported by: parthsaha at gmail dot com Summary: Mail code shows mail sent but didn't receive any mail -Status: Open +Status: Feedback Type: Bug Package: Mail related Operating System: Windows7 PHP Version: 5.4.10 Block user comment: N Private report: N New Comment: Citation from the same doc page: It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination. I'd probably recheck the php.ini and the MTA logs. Previous Comments: ------------------------------------------------------------------------ [2013-01-13 17:27:36] parthsaha at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=63981&edit=1