php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63981 Mail code shows mail sent but didn't receive any mail
Submitted: 2013-01-13 17:27 UTC Modified: 2013-02-18 00:36 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: parthsaha at gmail dot com Assigned:
Status: No Feedback Package: Mail related
PHP Version: 5.4.10 OS: Windows7
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-01-13 17:27 UTC] 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='parthsaha@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: <webmaster@example.com>' . "\r\n";
 $headers .= 'Cc: myboss@example.com' . "\r\n";
 
if(mail($to,$subject,$msg,$headers)==true)
{
echo "mail sent";
}
else
{
echo "mail not sent";
}

echo "Thanks $fname .";
?> 

</body>
</html>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-14 07:51 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2013-01-14 07:51 UTC] ab@php.net
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.
 [2013-02-18 00:36 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Nov 23 17:01:23 2020 UTC