<?php
/* Set e-mail recipient */
$to  =  $_POST['to'];

/* Check all form inputs using check_input function */

$yourname = $_POST['yourname'];
$email    = $_POST['email'];
$ip= $_SERVER["REMOTE_ADDR"];
$date=date("d m Y ");
$time= date("H:i");
$subject = "Customer sent u a message ";



if(empty($to))
{
?>
<script type="text/javascript">
alert('Please provide the email address to send');
history.go(-1);
</script>
<?php exit();
}

 

$message = "Hello!

Your customer has sent you an email:

Name: $yourname
E-mail: $email
Subject: $subject
date:$date
time:$time
ip address:$ip
End of message
";

/* Send the message using mail() function */
mail($myemail, $subject, $message );
?>
 
 
 Thank you <span class="bold"><?php echo $yourname  ?></span> for your mail.  <br>
We will reply back to <span class="bold"><?php echo $email  ?>  
 
