title: Mail returns false
body: <p>I'm currently using a custom made library at my job. Until just rencently the library was working perfectly. It apparently return false since about today.</p>
  
  <p>The library itself it basically a wrapper around the function mail. It builds the "boundaries" parts and everything.</p>
  
  <p>Since the class is quite big enough I wont post it here ... but I'm wondering, what are the reasons in theory of why mail would return false?</p>
  
  <ul>
  <li>SMTP is set in PHP.ini</li>
  <li>Sender is set in headers</li>
  <li>Sender is int the form of: <code>sender&lt;sender@email.com</code>></li>
  <li>Everything is sent correctly (body+headers+subject)</li>
  <li>Assume that mail( ) works correctly on the website but on this specific page it just doesn't. I know it must be comming from me but would be fun to have somewhere to start looking for.</li>
  <li>Oh and yeah the library is undocumented.</li>
  </ul>
  
  <p>[edit]
  Just found a smaller function and still doesn't work, I'll print it out then:</p>
  
  <pre><code>function send_html($from, $email, $subject = "AUCUN", $message, $cc = "", $bcc ="", $priotity = "3") {
      $headers = "";
      $headers .= "MIME-Version: 1.0\r\n"; 
      $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
  
      if (strpos($from, "ourwebsite.com") != false || strpos($from, "rencontresportive.com") != "") {
          $headers .= "From: Ourwebsite.com &lt;" . $from . "&gt;\r\n";
      } else {
          $headers .= "From: " . $from . " &lt;" . $from . "&gt;\r\n";
      }
  
      $headers .= "X-Sender: &lt;" . $from . "&gt;\r\n";
      $headers .= "X-Priority: " . $priotity . "\r\n";
      $headers .= "X-Mailer: PHP\r\n";
      $headers .= "Return-Path: &lt;admin@ourwebsite.com&gt;\r\n";
  
      if ($cc != "") {
          $headers .= "cc:" . $cc . "\r\n";
      }
      if ($bcc != "") {
          $headers .= "bcc:" . $bcc . "\r\n";
      }
          if (mail($email, $subject, $message, $headers)) {
          return true;
      } else {
          return false;
      }
  }
  </code></pre>
  
  <p>I called it with :</p>
  
  <pre><code>send_html(contact@ourwebsite.com, me@me.com, utf8_decode("the subject"), "&lt;h1&gt;test&lt;/h1&gt;");
  </code></pre>