<?php

$to      = 'hello@just-deliveries.co.uk';
$subject = 'Contact';
//print_r($_POST);
//exit;
$mail = $_REQUEST['mail']; //echo '<br />';

//echo '<pre>'; print_r($_REQUEST); echo '</pre>';

$message = '<table width="60%" cellpadding="0" cellspacing="0">
<tr height="20"><td><b>Email:</b></td><td>'.$_REQUEST['mail'].'</td></tr>
</table>';

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'To: justdeliveries<hello@just-deliveries.co.uk>' . "\r\n";
$headers .= 'From: '.$_REQUEST['name'].'<'.$to.'>' . "\r\n";

mail($to, $subject, $message, $headers);
$_SESSION['contact_us_message']="Thanks for Contacting us. We will get back to you within 24 hours";
header("location:thank-you.html");


?>