title: Bootstrap, contact_php and contact.js not sending email
body: <p>I am using Bootstrap and wanting to use an email contact form. I have setup a test page - <a href="http://www.beatrootonline.co.uk/test.html" rel="nofollow">http://www.beatrootonline.co.uk/test.html</a>. As you can see its validating ok (jqBootstrapValidation.js) and appears to send an email. However, I am not receiving an email from this form.</p>
  
  <p>Heres the html</p>
  
  <pre><code>&lt;div class="row"&gt;
  &lt;div class="col-lg-12"&gt;
  &lt;form name="sentMessage" id="contactForm" novalidate&gt;
  &lt;div class="row"&gt;
  &lt;div class="col-md-6"&gt;
  &lt;div class="form-group"&gt;
  &lt;input type="text" class="form-control" placeholder="Your Name *" id="name" required data-validation-required-message="Please enter your name."&gt;
  &lt;p class="help-block text-danger"&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
  &lt;input type="email" class="form-control" placeholder="Your Email *" id="email" required data-validation-required-message="Please enter your email address."&gt;
  &lt;p class="help-block text-danger"&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
  &lt;input type="tel" class="form-control" placeholder="Your Phone *" id="phone" required data-validation-required-message="Please enter your phone number."&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="col-md-6"&gt;
  &lt;div class="form-group"&gt;
   &lt;textarea class="form-control" placeholder="Your Message *" id="message" required data-validation-required-message="Please enter a message."&gt;&lt;/textarea&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="clearfix"&gt;&lt;/div&gt;
  &lt;div class="col-lg-12 text-center"&gt;
  &lt;div id="success"&gt;&lt;/div&gt;
  &lt;button type="submit" class="btn btn-xl"&gt;Send Message&lt;/button&gt;
  &lt;/div&gt;&lt;/div&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and the contact_me.js
      $(function() {</p>
  
  <pre><code>$("input,textarea").jqBootstrapValidation({
      preventSubmit: true,
      submitError: function($form, event, errors) {
          // additional error messages or events
      },
      submitSuccess: function($form, event) {
          event.preventDefault(); // prevent default submit behaviour
          // get values from FORM
          var name = $("input#name").val();
          var email = $("input#email").val();
          var phone = $("input#phone").val();
          var message = $("textarea#message").val();
          var firstName = name; // For Success/Failure Message
          // Check for white space in name for Success/Fail message
          if (firstName.indexOf(' ') &gt;= 0) {
              firstName = name.split(' ').slice(0, -1).join(' ');
          }
          $.ajax({
              url: "bin/contact_me.php",
              type: "POST",
              data: {
                  name: name,
                  phone: phone,
                  email: email,
                  message: message
              },
              cache: false,
              success: function() {
                  // Success message
                  $('#success').html("&lt;div class='alert alert-success'&gt;");
                  $('#success &gt; .alert-success').html("&lt;button type='button' class='close' data-dismiss='alert' aria-hidden='true'&gt;&amp;times;")
                      .append("&lt;/button&gt;");
                  $('#success &gt; .alert-success')
                      .append("&lt;strong&gt;Your message has been sent. &lt;/strong&gt;");
                  $('#success &gt; .alert-success')
                      .append('&lt;/div&gt;');
  
                  //clear all fields
                  $('#contactForm').trigger("reset");
              },
              error: function() {
                  // Fail message
                  $('#success').html("&lt;div class='alert alert-danger'&gt;");
                  $('#success &gt; .alert-danger').html("&lt;button type='button' class='close' data-dismiss='alert' aria-hidden='true'&gt;&amp;times;")
                      .append("&lt;/button&gt;");
                  $('#success &gt; .alert-danger').append("&lt;strong&gt;Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!");
                  $('#success &gt; .alert-danger').append('&lt;/div&gt;');
                  //clear all fields
                  $('#contactForm').trigger("reset");
              },
          })
      },
      filter: function() {
          return $(this).is(":visible");
      },
  });
  
  $("a[data-toggle=\"tab\"]").click(function(e) {
      e.preventDefault();
      $(this).tab("show");
  });
  });
  
  
  /*When clicking on Full hide fail/success boxes */
  $('#name').focus(function() {
  $('#success').html('');
  </code></pre>
  
  <p>and my contact_me.php</p>
  
  <pre><code>    &lt;?php
      // check if fields passed are empty
      if(empty($_POST['name'])        ||
      empty($_POST['email'])      ||
      empty($_POST['message'])    ||
     !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
     {
      echo "No arguments Provided!";
      return false;
     }
  
  $name = $_POST['name'];
  $email_address = $_POST['email'];
  $message = $_POST['message'];
  
  // create email body and send it    
  $to = 'me@myaddress.com'; // put your email
  $email_subject = "Contact form submitted by:  $name";
  $email_body = "You have received a new message. \n\n".
                    " Here are the details:\n \nName: $name \n ".
                    "Email: $email_address\n Message \n $message";
  $headers = "From: noreply@myaddress.com\n";
  
  
  $headers .= "Reply-To: $email_address"; 
  mail($to,$email_subject,$email_body,$headers);
  return true;            
  ?&gt;
  </code></pre>
  
  <p>I get a successful message on screen to say that the email has been sent but no email arrives (I have substituted my real email address for a fake on the php)</p>