<?php
require_once('class.phpmailer.php');

	$body ='<html>
<head>
  <title>Message Sent</title>
</head>
<body>';

	$name = $_POST['name'];
	$email = $_POST['Email'];
	$town = $_POST['Town'];
	$phone = $_POST['Phone'];
	$heard = $_POST['hearaboutus'];
	$message = $_POST['message'];
	
	$body .= '<h3>You have received a message from a redbrooktech.com User</h3>';
	$body .= '<br>Name : ' . $name ;
	$body .= '<br>Email : ' . $email ;
	$body .= '<br>Town : ' . $town ;
	$body .= '<br>Phone : ' . $phone ;
	$body .= '<br>Message : ' . $message;
	$body .= '</body></html>';
	
	//$mail = new PHPMailer();
//	$mail->IsSMTP(); // send via SMTP
	//$mail->Host = 'mail.pendragoninteractive.com';
	//$mail->Port = 2626;
	//$mail->SMTPAuth = true; // turn on SMTP authentication
	//$mail->Username = "admin@pendragoninteractive.com"; // SMTP username
	/*$mail->Password = "nexus69"; // SMTP password
	$webmaster_email = "admin@pendragoninteractive.com"; //Reply to this email ID
	$email="jimdunstan@gmail.com"; // Recipients email ID
	$name="name"; // Recipient's name
	$mail->From = $webmaster_email;
	$mail->FromName = "Pendragon Interactive Quote Request";
	$mail->AddAddress($email,$name);
	$mail->AddReplyTo($webmaster_email,"Webmaster");
	$mail->WordWrap = 50; // set word wrap
	$mail->IsHTML(true); // send as HTML
	$mail->Subject = "Please supply a quote";
	$mail->Body = $body; //HTML Body
	$mail->AltBody = "This is the body when user views in plain text format"; //Text Body*/
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'To: info@redbrooktech.com' . "\r\n";
$headers .= 'From: redbrooktech.com <info@redbrooktech.com>' . "\r\n";
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- #BeginTemplate "main.dwt" -->
<head>
<!-- #BeginEditable "doctitle" -->
<title>Redbrook Technology Contact Form</title>
<!-- #EndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="style.css" rel="stylesheet" type="text/css" />
<!-- CuFon: Enables smooth pretty custom font rendering. 100% SEO friendly. To disable, remove this section -->
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/arial.js"></script>
<script type="text/javascript" src="js/cuf_run.js"></script>
<!-- CuFon ends -->
</head>
<body>
<script type="text/javascript">var _kiq = _kiq || [];</script>
<script type="text/javascript" src="///s3.amazonaws.com/ki.js/24502/4SI.js" async="true"></script>
<div class="main">

  <div class="header">
    <div class="header_resize">
      <div class="logo"><h1><a href="index.html"><span>Redbrook</span> Technology<small>Taking the pain out of computing</small></a>
		  </h1></div>
      <div class="menu_nav">
        <ul>
        <!-- #BeginEditable "tmenu" -->
          <li class="active"><a href="index.html" name="home">Home</a></li>
          <li><a href="about.html">About Us</a></li>
          <li><a href="services.html">Services</a></li>
          <li><a href="products.html">Products</a></li>
          <li><a href="contact.html">Contact Us</a></li>
          <!-- #EndEditable -->
        </ul>
      </div>
      <div class="clr"></div>
    </div>
  </div>

  <div class="hbg">&nbsp;</div>

  <div class="content">
    <div class="content_resize">
      <div class="mainbar">
      <!-- #BeginEditable "main" -->
        <div class="article">

<?php
if(!empty($email)){
	if(!mail("info@redbrooktech.com","Message from redbrooktech.com User",$body,$headers))
	{
	echo "Mailer Error - Please send your quote request details to : sales@redbrooktech.com ";
	}
	else
	{
echo "<h3>Thank you. Your Message or question has been sent.</h3><p>Someone will reply to you shortly.</p>";
	}
}else
{
echo "<h3>You did not enter your Email Address</h3><p>Please return to the form and retry</p>";

}

?>


        </div>
        <!-- #EndEditable -->
      </div>
      <div class="sidebar">
        <div class="gadget">
        <!-- #BeginEditable "sidebar" -->
          <h2 class="star"><span>Services</span></h2><div class="clr"></div>
          <ul class="sb_menu">
            
            <li><a href="techsupport.html">Technical Support</a></li>
            <li><a href="applicationdevelopment.html">Application Development</a></li>
            <li><a href="webdevelopment.html">Web Development</a></li>
            <li><a href="seoservices.html">SEO</a></li>
            
          </ul>
          <!-- #EndEditable -->
        </div>
        <div class="gadget">
        <!-- #BeginEditable "gadget" -->
          <h2 class="star"><span>Products</span></h2><div class="clr"></div>
          <ul class="ex_menu">
            <li><a href="AccessConverter.html" title="Evolution">Evolution</a><br />Convert your legacy Access Apps. to VB.NET</li>
            <li><a href="repairtracking.html">TrailBlazer</a><br />Keep track of repair items in your shop</li>
            <li><a href="codespark.html" title="Code Generator">CodeSpark</a><br />.NET Code Generator</li>
          </ul>
          <!-- #EndEditable -->
        </div>
      </div>
      <div class="clr"></div>
    </div>
  </div>

  <div class="fbg">
    <div class="fbg_resize">
    <!-- #BeginEditable "bottom" -->
      <div class="col c1">
      </div>
      <div class="col c2">
      </div>
      <div class="col c3">
      </div>
      <div class="clr"></div>
      <!-- #EndEditable -->
    </div>
  </div>
  <div class="footer">
    <div class="footer_resize">
      <p class="lf"> Copyright &copy; <a href="http://www.redbrooktech.com">Redbrook Technology</a>.</p>
      <ul class="fmenu">
      <!-- #BeginEditable "fmenu" -->
        <li class="active"><a href="index.html">Home</a></li>
        <li><a href="about.html">About</a></li>
        <li><a href="services.html">Services</a></li>
        <li><a href="products.html">Products</a></li>
        <li><a href="contactx.html">Contacts</a></li>
        <!-- #EndEditable -->
      </ul>
      <div class="clr"></div>
    </div>
  </div>
</div>
<!-- Start of StatCounter Code for Default Guide -->
<script type="text/javascript">
var sc_project=7242285; 
var sc_invisible=1; 
var sc_security="eb7d8f79"; 
</script>
<script type="text/javascript"
src="http://www.statcounter.com/counter/counter.js"></script>
<noscript><div class="statcounter"><a title="free hit
counter" href="http://statcounter.com/" target="_blank"><img
class="statcounter"
src="http://c.statcounter.com/7242285/0/eb7d8f79/1/"
alt="free hit counter"></a></div></noscript>
<!-- End of StatCounter Code for Default Guide -->
</body>
<!-- #EndTemplate -->
</html>
