PHP mail() claiming sent but not received

时间:2016-04-04 18:01:29

标签: php email

I've created a PHP form to send an email and when testing it says sent but is never received.

I've checked that each string is fetched correctly

This is the script:

<?PHP

$name = $_POST["name"];
$theyare = $_POST["whatareyou"];
$usermail = $_POST["email"];
$comment = $_POST["comment"];

$to = "Myemail@mydomain.com";
$subject = "Website contact";

$message = "A new comment was given by $name 
    \nThey Are: $theyare 
    \n Comment: $comment 
    \n\n Email: $usermail";

$message = wordwrap($message,70);

if(mail($to,$subject,$message))
{
echo "sent to $to";
}
else
{
echo "error";
}

?>  

I know this just got marked as repeat question but I select it as a differant one as its differant code and a differant server

0 个答案:

没有答案
相关问题