I have a contact form on my website and it does not seem to be sending emails. It was on a server when I have been testing it.
Here is the form.
    <form  action="" method="post" name="form">
        <input type="text" name="name" />
        <input  type="email" name="email" />
        <textarea name="message" ></textarea>
        <input  name="submit" type="submit" value="Submit">
    </form>
And here is the PHP code.
   <?php
        if(isset($_POST["submit"])){
        if($_POST["name"]==""||$_POST["email"]==""||$_POST["message"]==""){
        echo "Please fill in the contact form";
        }else{
        $to = "example@gmail.com";
        $subject = "Contact Form";
        $name= $_POST['name'];
        $email= $_POST['email'];
        $message= $_POST['message'];
        $headers = "From: example@gmail.com";
        mail($to,$subject,$name,$email,$message,$headers);
        }
        }
     ?>
I have changed my email address to a dummy one there but it does I have not recieved any emails when I do submit this form though.
Thanks in advance! :)
 
    