This is code of my form.
<form method="post" action="mailer.php" id="contactfrm">
        <div class="col-sm-4">
          <div class="form-group">
            <label for="name">Name</label>
            <input type="text" class="form-control" name="name" id="name" placeholder="Enter name" title="Please enter your name (at least 2 characters)">
          </div>
          <div class="form-group">
            <label for="email">Email</label>
            <input type="email" class="form-control" name="email" id="email" placeholder="Enter email" title="Please enter a valid email address">
          </div>
        </div>
        <div class="col-sm-4">
          <div class="form-group">
            <label for="comments">Message</label>
            <textarea name="message" class="form-control" id="comments" cols="3" rows="5" placeholder="Enter your message…" title="Please enter your message (at least 10 characters)"></textarea>
          </div>
          <button name="submit" type="submit" class="btn btn-lg btn-primary" id="submit">Submit</button>
          <div class="result"></div>
        </div>
      </form>
Here My mailer.php
<?php
$replyemail="my email"; 
$name = $_POST["name"];
$email = $_POST["email"];
$thesubject = "Project With Me Query";
$themessage = $_POST["message"];
$success_sent_msg='<p align="center"><strong> </strong></p>
                   <p align="center"><strong>Your message has been successfully sent to My Email<br>
                   </strong> and I will reply as soon as possible.</p>
                   <p align="center">A copy of your query has been sent to you.</p>
                   <p align="center">Thank you for contacting Me.</p>';
$replymessage = "Hi $name
Thank you for your email.
We will endeavour to reply to you shortly.
Please DO NOT reply to this email.
Below is a copy of the message you submitted:
--------------------------------------------------
Subject: $thesubject
Query:
$themessage
--------------------------------------------------
Thank you";
$themessage = "name: $name \nQuery: $themessage";
mail("$replyemail",
     "$thesubject",
     "$themessage",
     "From: $email\nReply-To: $email");
mail("$email",
     "Receipt: $thesubject",
     "$replymessage",
     "From: $replyemail\nReply-To: $replyemail");
echo $success_sent_msg;
echo '<script>setTimeout(function(){location.href="index.php"} , 5000);   </script>';
?>
I am unable to figure out what wrong I've done. whenever i fill out information in for a Success Message displayed. but i didn't get any email of that information.
can someone fix this existing code or provide me a new mailer code?
 
    