// SEND MAIL FORM
// to use the form just chanage the variables below
$to_name = 'Simon Hardman'; // insert persons name that the email will be sent to
$to_address = 'simon@meadowviewmedia.co.uk'; // insert persons address that the email will be sent to
$subject = 'message from meadow view website'; // insert message subject here
if (empty($_POST['email'])) {
?>
} else {
$message = 'Name: '.$_POST['name']."\r\n".
'Telephone: '.$_POST['phone']."\r\n".
'Email: '.$_POST['email']."\r\n".
'Message: '.$_POST['message'];
$headers = 'Reply-To: '.$_POST['name'].'<'.$_POST['email'].'>'."\r\n".
'From: '.$_POST['name'].'<'.$_POST['email'].'>'."\r\n".
'X-Mailer: PHP/'.phpversion();
if (mail($to_address,$subject,$message,$headers)) { ?>
This message has been sent. Thank you for your enquiry, we'll contact you as soon as possible.
} else { ?>I'm sorry there was a problem with sending the email. Please try again later.
} } ?>