Hello guys,
I am creating a website. I want to use a simple contact form in it.To mail to contact the owner of the site.  I got my form and validations on my form using HTML, Java Script and PHP. My form gives the message that email is sent. But I could not get anything in my mail box  of (yahoo or gmail) do I need to configure my mail box also for this and how to do that? I am working on localhost using Xampp. Thank you for your time and help.
My code is in two files as follows. form.php and contact.php
form.php


Try the simple form with validation using java script

 



    Your name:

   
Your email:

   
Your message:

   

   
 





and contact.php as
 
 $to = "[email protected]"; 
 $subject = "Contact Us"; 
 $email = $_REQUEST['email'] ; 
 $message = $_REQUEST['message'] ; 
 $headers = "From: $email"; 
 $sent = mail($to, $subject, $message, $headers) ; 
 if($sent) 
 {print "Your mail was sent successfully"; }
 else 
 {print "We encountered an error sending your mail"; }
 ?>