title: php mail not sending from contact form
body: <p>I have put together a form with validation with help from this tutorial: <a href="http://www.w3resource.com/php/form/php-form-validation.php" rel="nofollow">http://www.w3resource.com/php/form/php-form-validation.php</a></p>
  
  <p>I am hoping somebody can point out where I have gone wrong? As my validation works, I get a thankyou message but no mail comes through to my inbox :(</p>
  
  <pre><code>&lt;?php        
  if (isset($_POST['submit'])) {        
      //checking name        
      if(empty($_POST['full_name']))        
      $msg_name = "*";        
      $name_subject = $_POST['full_name'];        
      //check phone number        
      if(empty($_POST['Phone_Num']))        
      $msg_Phone = "*";        
      $email_subject = $_POST['Phone_Num'];        
      //check email        
      if(empty($_POST['email_addr']))        
      $msg_email = "*";        
      $email_subject = $_POST['email_addr'];        
      $email_pattern = '/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/';        
      preg_match($email_pattern, $email_subject, $email_matches);        
      if(!$email_matches[0])        
      $msg2_email = "Please enter a valid email address";
  }           
  // validation complete         
  if(isset($_POST['submit'])){        
      if($msg_name=="" &amp;&amp; $msg2_name=="" &amp;&amp; $msg_email=="" &amp;&amp; $msg2_email=="" &amp;&amp;         $msg2_Message=="")        
      $msg_success = "Thankyou for your enquiry";        
      //send mail           
      $to = "someone@email.com";          
      $subject = "Data collected thorugh from";          
      $message = "&lt;p&gt;".$_POST["full_name"]."&lt;/p&gt;&lt;p&gt;".$_POST["Phone_Num"]."        &lt;/p&gt;&lt;p&gt;".$_POST["email_addr"]."&lt;/p&gt;&lt;p&gt;".$_POST["Message"]."&lt;/p&gt;";
      $from = "someone@email.com";          
      mail($to,$subject,$message);          
  }        
  ?&gt;
  </code></pre>