title: My php mail function is not working?
body: <p>Ive got the following php code:</p>
  
  <pre><code>&lt;?
  if ($_POST['emailme']) {
  $yemail = $_POST['email'];
  $host = $_SERVER['HTTP_HOST'];
  $email = "&lt;autoreply@$host&gt;";
  if (mail('$yemail', 'This is a Subject', 'This is the body of the email', 'From: $email')) {
  echo "Message sent!";
  } else {
  echo "Message failed sending!";
  }
  }
  ?&gt;
  </code></pre>
  
  <p>This is my HTML:</p>
  
  <pre><code>&lt;FORM METHOD="POST" ACTION=""&gt;&lt;INPUT TYPE='TEXT' CLASS='BOX' NAME='email' /&gt;&lt;INPUT TYPE='SUBMIT' NAME='emailme' CLASS='SUBMITBOX' VALUE='Send!' /&gt;&lt;/FORM&gt;
  </code></pre>
  
  <p>Any ideas why its not sending the email ? it says Message Sent but im not receiving any emails in my inbox</p>
  
  <p>All help is much appreciated, thanks</p>
  
  <p>PS: ive tried the following (with double quotes):</p>
  
  <pre><code>if (mail("$yemail", "This is a Subject", "This is the body of the email", "From:" . $email))  {
  echo "Message sent!";
  } else {
  echo "Message failed sending!";
  }
  </code></pre>
  
  <p>but still no luck</p>