Possible Duplicate:
PHP mail stopped working
I'm using PHP mail()
function to send a Contact Us form.
This works for all the emails that I've tried but the ones with the customer's company suffix:[something]@3gdirectpay.com
.
The function returns true
, but he doesn't get anything, even after checking the spam.
The code:
<?php
$email="You have recieved a new message from a customer: \r\n \r\n";
if (isset($_POST)) {
foreach ($_POST as $key=>$value) {
if (isset($value) && $value!='' && $key[0]!='x' && $key!='mf_mail' && $key!=='mf_text') {
$email.=$_POST['x' . $key] . $value . "<br>";
}
else if ($key=='mf_text') {
$text = "Message: " . $value;
}
}
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$email.= $text;
$to = "info@3gdirectpay.com, eran@3gdirectpay.com";
$from = $_POST['mf_mail'];
$subject = "New message from a customer";
mail($to,$subject,$email,$headers);
}
header("Location:http://www.3gdirectpay.com/?m=sent");
?>
The customer said that they are hosting their mail services with Gmail. I am quite positive it has something to do with the suffix, but what can cause such a peculiar behavior?