title: PHP mail: What does -f do?
body: <p>While troubleshooting a contact form with an e-mail host they told me to use '-f' in the from address of the php mail function. What does the "-f" flag do and why would that be a fix for allowing an e-mail to be delivered? I read some of the documentation but I'm not quite clear on it.</p>
  
  <p>Example code:</p>
  
  <pre><code>mail($emailAddress, $mailSubject, $mailBody, $headers, '-f ' . $mailFrom);
  </code></pre>
  
  <p>PS: without the "-f" it works just fine for the big e-mail hosts (hotmail, gmail, etc, but for whatever reason not for the smaller host I'm working with)</p>
  
  <p>Thanks</p>