title: PHP Mail() sent to Outlook breaks code
body: <p>I've looked around here but could not find an answer regarding the problem that I am facing. </p>
  
  <p>Most similar to my problems are in this: <a href="https://stackoverflow.com/questions/1768016/emails-sent-with-php-mail-dont-show-up-correctly-in-outlook">emails sent with php mail don&#39;t show up correctly in outlook</a> , but I checked and the solution did not work for me.</p>
  
  <p>I am basically writing a PHP script that sends out emails, with a table in it. The problem however, is that if I receive it in gmail, the email shows up fine, but it does not even come through to Outlook at all.</p>
  
  <p>Examining the source code of emails that do make it through to Outlook, shows a line break for some reason (again not present in gmail)</p>
  
  <p>Eg:</p>
  
  <pre><code>&lt;td&gt;  xyz@aaa
  tt.com &lt;/td&gt;
  </code></pre>
  
  <p>When it should show up as:</p>
  
  <pre><code>&lt;td&gt;  xyz@aaatt.com &lt;/td&gt;
  </code></pre>
  
  <p>In my php code, I even try to remove the line returns and spaces (as there should be no spaces in emails)</p>
  
  <pre><code>$rmv = array("\n");
  $lead_email = str_replace($rmv, "", $lead_email);
  
  $rmv = array("\r");
  $lead_email = str_replace($rmv, "", $lead_email);
  
  $rmv = array(" ");
  $lead_email = str_replace($rmv, "", $lead_email);
  </code></pre>
  
  <p>For reference, my mail header is as follows:</p>
  
  <pre><code>$headers  = 'MIME-Version: 1.0' . "\n";
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
  $headers .= 'From: helpdesk@viatechcrm.com' . "\n";
  </code></pre>
  
  <p>Btw should I use iso-8859-1 or utf-8? I occasionally encounter names with European characters. </p>
  
  <p>Any help greatly appreciated! </p>
  
  <p>EDIT: So I was examining the source code, and found something interesting. The message is really long, but it only shows 3-4 lines. I found that it gets cut off right about 991 characters, thus the email breaking up.. Is this something to do with the Mime-Version 1.0?
  How can I increase the number of characters it can receive? I tried adding '\r\n' after every table row, but one of the 4 emails still does not show up for some reason</p>
  
  <p><strong>EDIT 2</strong>: Thanks everyone for the help! I finally figured it out, in a forum post dated back in 2009. For future reference, refer to the last posting:</p>
  
  <p><a href="http://forums.devarticles.com/php-development-48/formatting-a-newline-line-break-in-php-html-output-5274.html" rel="nofollow noreferrer">http://forums.devarticles.com/php-development-48/formatting-a-newline-line-break-in-php-html-output-5274.html</a></p>