Hi, i am getting the error - Notice: Undefined variable: headers in E:\domains\s\satnas-digital.co.uk\user\htdocs\contact.php on line 7
Warning: mail() [function.mail]: SMTP server response: 554 Error: no valid recipients in E:\domains\s\satnas-digital.co.uk\user\htdocs\contact.php on line 7
Thankyou your details have been submitted and we will get back to you shortly
My php contact form is
<?php
$emailSubject = 'contact.php';
$webMaster = 'example@example.com';
ini_set("sendmail_from", "example@example.com");
mail($email_to, $email_subject, $email_message, $headers, "-fexample@example.com");
/* Data Variables */
$name = $_POST['name'];
$subject = $_POST['subject'];
$address =$_POST['address'];
$telephone = $_POST['telephone'];
$email = $_POST['email'];
$comments = $_POST['comments'];
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Subject: $subject <br>
Address: $address <br>
Telephone: $telephone <br>
Email: $email <br>
Comments: $comments <br>
EOD;
$headers = "From: $email\r\n";
$headers = "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title>sent message</title>
<meta http-equiv="refresh" content="3;URL=http://www.satnas-digital.co.uk/bookonline.html">
<style type="text/css">
<!--
body {
background-color: #444; /* You can edit this CSS to match your website*/
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 20px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #fec001;
text-decoration: none;
padding-top: 200px;
margin-left: 150px;
width: 800px;
}
-->
</style>
</head>
<div align="center">Thankyou your details have been submitted and we will get back to you shortly</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
Any help please.