php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45474 mail worked but not received
Submitted: 2008-07-10 10:06 UTC Modified: 2008-07-10 10:22 UTC
From: smartin_12 at yahoo dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.6 OS: windows xp
Private report: No CVE-ID: None
 [2008-07-10 10:06 UTC] smartin_12 at yahoo dot com
Description:
------------
mail function execute properly but not received.

if i upload the mail.php which contain mail function at our server

the function is sent but mail not received 



Reproduce code:
---------------
<?php

$to = "smartin_12@yahoo.com";

$subject = "PBCM-Prayer Request";

$message = '<html>
            <head>
            </head>
            <body>
            <p></p>
            <table>
            <tr>
            <td>Name		:</td><td></td><td>'.$_POST[name].'</td>
            </tr>
            <tr>
            <td>E-Mail    :</td><td></td><td>'.$_POST[mail].'</td>
            </tr>
			<tr>
            <td>Phone		:</td><td></td><td>'.$_POST[phoneno].'</td>
            </tr>
			<tr>
            <td>Subject	:</td><td></td><td>'.$_POST[prayer].'</td>
            </tr>
			<tr>
            <td>Status		:</td><td></td><td>'.$_POST[who].'</td>
            </tr>
			<tr>
            <td>PrayerRequest	:</td><td></td><td>'.$_POST[request].'</td>
            </tr>
            </table>
           </body>
           </html>
'; 
$from= "MIME-Version: 1.0\r\n";
$from.= "Content-type: text/html; charset=iso-8859-1\r\n"; 
$from.= "From: $_POST[name]<$_POST[mail]>";

mail($to,$subject,$message,$from);

//phpinfo();

?>

Expected result:
----------------
the mail should go to the corresponding id


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-10 10:21 UTC] felixdv@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

The correct delivery of the mail is the responsability of the MTA on your machine. The provided code works as it should over here, this is not a mail() issue.
 [2008-07-10 10:22 UTC] jani@php.net
Most likely your mail just ends up in a spam filter. mail() works fine when used properly -> not a bug here.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Dec 01 16:00:02 2025 UTC