title: PHP Mail - Multiple or malformed newlines found
body: <p>we upgraded our version of PHP and are now getting the error " Warning: mail(): Multiple or malformed newlines found in additional_header".</p>
  
  <p>I've created experimenting with different things but haven't gotten anything to work. I apologize as I'm not very familiar with how all of this works, so please bear with me. </p>
  
  <p>The objective (which worked in earlier versions) is to send an HTML based message (has , <br> tags, etc) that includes a PDF attachment that exists on our server.</p>
  
  <p>If you can give me specific adjustments, I'd appreciate it greatly!</p>
  
  <pre><code>$sFrom = "[Company Name] &lt;[Our Email]&gt;";
  $sReplyTo = "[Our Email]";
  $sParams = "-f [Our Email]";
  $attachment = chunk_split(base64_encode(file_get_contents($sPath)));
  $uid = md5(uniqid(time()));
  
  $sHeaders = "From: ".$sFrom."\n".
              "Reply-To: ".$sReplyTo."\n".
              "MIME-Version: 1.0\n".
              "Content-Type: multipart/mixed; boundary=\"".$uid."\"\n\n".
              "This is a multi-part message in MIME format.\n".
              "--".$uid."\n".
              "Content-Type: text/html; charset='iso-8859-1'\n".
              "Content-Transfer-Encoding: 7bit\n\n".
              $sMessage."\n\n".
              "--".$uid."\n".
              "Content-Type: application/pdf; name=\"".$sFileName."\"\n".
              "Content-Transfer-Encoding: base64\n".
              "Content-Disposition: attachment; filename=\"".$sFileName."\"\n\n".
              $attachment."\n\n".
              "--".$uid."--";    
  if (!mail($sTo, $sSubject, "", $sHeaders, $sParams)) {
      $bError = true;
  }
  </code></pre>