title: A php mail function regarding the additional parameters for headers
body: <p>I'm using dreamhost for my mailing.
  I'm having an issue with php mail function additional headers parameters.
  This code works, and the email is sent:</p>
  
  <pre><code>$to = 'myemail@gmail.com';
  $name = $_POST['name'];
  $email = $_POST['email'];
  $subject = $_POST['subject'];
  $message = $_POST['message'];
  $headers = "From: $name &lt;**webmaster@example.com**&gt;\r\n" .
      "Reply-To: $name &lt;**webmaster@example.com**&gt;\r\n" .
      'X-Mailer: PHP/' . phpversion();
  mail($to, $subject, $message, $headers);
  </code></pre>
  
  <p>but when I replace webmaster@example.com to the variable $email</p>
  
  <pre><code>$headers = "From: $name &lt;**$email**&gt;\r\n" .
      "Reply-To: $name &lt;**$email**&gt;\r\n" .
      'X-Mailer: PHP/' . phpversion();
  </code></pre>
  
  <p>The email doesn't get sent. I did do a print_r($_POST), and the elements are there. I also did another test where I typed the email: webmaster@example.com into the form, to see if it would send, and it did. So my question is, how do I remedy this issue, if a user types their email address into the form with another mailing extension, that mail will not get sent, but if the extension is @example.com, then the mail will get sent. </p>