title: Unable to send mails in PHP contact form using 000webhost webmail
body: <p>I am using 000webhost webmail to receive emails using contact form but its not working.</p>
  
  <p><strong>contact.php</strong></p>
  
  <pre><code>     &lt;form  action="mailer.php" method="post"&gt;
  &lt;p&gt;Name:&lt;/p&gt;
  &lt;input type="text" name="name" /&gt;
  &lt;p&gt;E-mail:&lt;/p&gt;
  &lt;input type="text" name="email" /&gt;
  &lt;p&gt;Subject:&lt;/p&gt;
  &lt;input type="text" name="subject" /&gt;
  &lt;p&gt;Message:&lt;/p&gt;
  &lt;textarea name="message"&gt;&lt;/textarea&gt;&lt;/p&gt;
  &lt;input class="send" type="submit" value="Send" name="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>mailer.php</strong></p>
  
  <pre><code>     &lt;?php
  
  $to = "xxx@xxxxx.com";
  $subject = "Support requested by ".$_POST['name'];
  $name_field = $_POST['name'];
  $email_field = $_POST['email'];
  $message = $_POST['message'];
  
  $headers = 'From: '.$_POST['email'].'' . "\r\n" .
     'Reply-To: '.$_POST['email'].'' . "\r\n" .
     'X-Mailer: PHP/' . phpversion();
  
  $body = $message;
  
  @mail($to, $subject, $body, $headers );
  header( 'Location:thankyou.php' ) ; //replace with landing page.
  ?&gt;
  </code></pre>