title: PHP mail() function will not send to gmail but will send to my non-gmail account
body: <p>For some reason the php mail() function is not working properly on a site I am building. I tried to troubleshoot the issue down to its simplest form, and came up with this file:</p>
  <pre><code>&lt;?php
  mail('myEmail@gmail.com', 'the subject', 'the message', 'From: webmaster@example.com', '-fwebmaster@example.com');
  ?&gt;
  </code></pre>
  <p>when myEmail is a Gmail account, I never receive  the message. However when I use a non-gmail account, I do receive the message. I am at a loss and have tried everything to figure this out. I am starting to think it is an obscure host/server issue. You can see the server specs here: <a href="http://aopmfg.com/php.php" rel="nofollow noreferrer">http://aopmfg.com/php.php</a></p>
  <p>Any ideas?</p>
  <p>EDIT - let me also add that this was all working fine a few weeks ago, the last time I tested it. No significant code changes since then at all.</p>
  <p>EDIT 2 - After reading a similar post I tried adding From and Reply-To headers... still no luck. New code:</p>
  <pre><code>&lt;?
  $headers = 'From: &lt;some@email.com&gt;' . &quot;\r\n&quot; .
  'Reply-To: &lt;some@email.com&gt;';
  
  mail('&lt;myEmail@gmail.com&gt;', 'the subject', 'the message', $headers,
  '-fwebmaster@example.com');
  ?&gt;
  </code></pre>