title: PHP @mail returning false
body: <p>This code is not sending email, and I'm getting no errors to indicate why.  How is one supposed to troubleshoot this?</p>
  
  <pre><code>    $uid = md5(uniqid(time()));
      $headers= "From: " . $this-&gt;fromAddress . "  &lt;" . $this-&gt;fromName . "&gt;\r\n";
      $headers.= "Reply-To: " . $this-&gt;fromAddress . " &lt;" . $this-&gt;fromName . "&gt;\r\n";
      if ($this-&gt;cc != "") { $headers .= "CC: ".$this-&gt;cc."\r\n"; }
      if ($this-&gt;bcc != "") { $headers .= "BCC: ".$this-&gt;bcc."\r\n"; }
      $headers .= "MIME-Version: 1.0\r\n";
      $headers .= "Content-Type: multipart/mixed; boundary=\"" . $uid . "\"\r\n\r\n";
      $headers .= "This is a multi-part message in MIME format.\r\n";
      $headers .= "--" . $uid . "\r\n";
      $headers .= "Content-type:text/html; charset=iso-8859-1\r\n";
      $headers .= "Content-Transfer-Encoding: 7bit\r\n\r\n";
      $headers .= $this-&gt;body . "\r\n\r\n";
      $headers .= "--".$uid."--";
  
      $mail_sent = @mail($this-&gt;toAddress,$this-&gt;subject,'',$headers);
  
      if (!$mail_sent) {
          throw new Exception('Email failed to send');
      }
  </code></pre>
  
  <p>The result here is the Exception is thrown and nothing else.  So @mail is returning false.  Not much to go on ...  </p>
  
  <p>As an aside, the mail server is localhost (that does not require authentication) which sends email fine using similar code.  </p>
  
  <p>I have compared this code to the successful code and, although I'm obviously not seeing the critical piece, all of the differences seem to me to be unrelated to core email sending code.  </p>
  
  <p>The php mail log reads:</p>
  
  <pre><code>mail() on [C:\Users\Owner\PhpstormProjects\CRM\classes\CompanyName\Email.php:75]: To: lowens@companyname.com -- Headers: From: lowens@companyname.com  &lt;lowens@companyname.com&gt;  Reply-To: lowens@companyname.com &lt;lowens@companyname.com&gt;  MIME-Version: 1.0  Content-Type: multipart/mixed; boundary="7feeadcdbd29ed703423feb85438c14b"    This is a multi-part message in MIME format.  --7feeadcdbd29ed703423feb85438c14b  Content-type:text/html; charset=iso-8859-1  Content-Transfer-Encoding: 7bit    asdfasdf    --7feeadcdbd29ed703423feb85438c14b--
  </code></pre>