I am attempting to use php to email me with the response to a webform and for some reason the email is never getting to me. I have included the php code below. Any help in figuring out what I'm doing wrong would be greatly appreciated.
<?php
$to = "ckuehn1701@yahoo.com";
$subject = "FAQ";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];
$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
$send = mail($to, $subject, $body);
if($send) {echo "Data has been submitted to $to!";}
else {echo "We encountered an error submitting your question, please try again.";}
?>
<?php
$to = "ckuehn1701@yahoo.com";
$subject = "FAQ";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];
$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
$send = mail($to, $subject, $body);
if($send) {echo "Data has been submitted to $to!";}
else {echo "We encountered an error submitting your question, please try again.";}
?>