Hey guys,
I'm using the PHP mail function on a contact form but some reason I can only seem to have the emails delivered to my gmail account. If I change the send to address to my work email - which is where I need the emails to be sent - they're never delivered.
I've checked my spam folder to see if they've been intercepted but there's just no sign of them. I've even tried a colleague's email address on a different domain and the end result is the same.
I just can't understand it. See my code below:
$submit=$_POST['submit'];
if (isset($submit))
{
$name=$_POST['frm_name'];
$telephone=$_POST['frm_telephone'];
$emailaddress=$_POST['frm_email'];
$message=$_POST['frm_message'];
$message=strip_tags($message);
$emailcontent = "Name = $name\n\nTelephone Number = $telephone\n\nEmail = $emailaddress\n\nMessage: $message";
$headers = 'From: ' . $name . "\r\nReply-To:" . $emailaddress;
mail("example@example.com", "Contact Form.", $emailcontent, $headers);
}