title: Base64 encoded excel file not decoding in email attachments
body: <p>I am creating an excel file and attaching it in an email. The email sends with the excel file attached, but the contents are all mucked up (N¬ŠÆ›j×!­êh®×è®Ø^¥êè‰ÚÓzÛMy¶9×Í´×).</p>
  
  <pre><code>$sFileName = "BatchReport".date("Y-m-d");
  $eContent = chunk_split(base64_encode(file_get_contents(WP_PLUGIN_DIR."/cs-cart/includes/excel/".$sFileName.".xls")));
  $sUniqueID = md5(uniqid(time()));
  
  $sHeaders = "From: " . (($sFrom) ? $sFrom : "Cervid Solutions &lt;admin@" . str_replace("www.","",$_SERVER["HTTP_HOST"]) . "&gt;") . "\n" .
                      "MIME-Version: 1.0\n" .
                      "Content-Type: multipart/mixed; boundary=".$sUniqueID."\n\n" .
                      "This is a multi-part message in MIME format.\r\n" .
                      "--".$sUniqueID."\r\n" .
                      "Content-Type: text/plain; charset=ISO-8859-1\r\n" .
                      "Content-Transfer-Encoding: 7bit\r\n\r\n" .
                      $sMessage."\r\n\r\n" .
                      "--".$sUniqueID."\r\n" .
                      "Content-Type: application/octet-stream; name=".$sFileName.".xls"."\n" .
                      "Content-Transfer-Encoding: base64\r\n" .
                      "Content-Disposition: attachment; filename=".$sFileName.".xls"."\r\n\r\n" .
                      $eContent."\r\n\r\n" .
                      "--".$sUniqueID."--";
  
  wp_mail($sTo, $sSubject, $sMessage, $sHeaders);
  </code></pre>
  
  <p>I have seen other people use this same code, but do not seem to have the same issue with the file contents being decoded properly. What am I doing wrong?</p>