title: workaround for the 990 character limitation for email mailservers
body: <p>Wanted to know if there are any functions/classes/etc.. to help with the 990 character limitation for email as my HTML is being effected due to this.</p>
  
  <p>The Problem: (<a href="http://staf.sourceforge.net/current/email.html" rel="noreferrer">Source</a>)</p>
  
  <blockquote>
    <p>Note that mailservers have a
    990-character limit on each line
    contained within an email message. If
    an email message is sent that contains
    lines longer than 990-characters,
    those lines will be subdivided by
    additional line ending characters,
    which can cause corruption in the
    email message, particularly for HTML
    content. To prevent this from
    occurring, add your own line-ending
    characters at appropriate locations
    within the email message to ensure
    that no lines are longer than 990
    characters.</p>
  </blockquote>
  
  <p>Anyone else seem to have this problem? and how did you fix this?</p>
  
  <p>Sounds like I need to find a good place to split my HTML and manually add a line break, ugh...</p>
  
  <p>UPDATE:</p>
  
  <p>It's tablature data with many rows. So do I need to add a \n or <code>&lt;br /&gt;</code> somewhere?</p>
  
  <p>UPDATE #2: Adding MIME Type Code</p>
  
  <pre><code>$headers  = "MIME-Version: 1.0" . "\r\n";
  $headers .= "Content-type:text/html;charset=iso-8859-1\r\n";
  $headers .= "Content-Transfer-Encoding: quoted-printable\r\n"; // added this, but still no results
  $headers .= "From: from@email.com\r\n";
  </code></pre>
  
  <p>Here is how I'm calling the function(s):</p>
  
  <p>How I originally called:</p>
  
  <pre><code>return $html;
  </code></pre>
  
  <p>What I tried:</p>
  
  <pre><code>return imap_8bit($html); // not working, nothing is captured in the error log
  </code></pre>
  
  <p>AND</p>
  
  <pre><code>return imap_binary($html); // not working, nothing is captured in the error log
  </code></pre>
  
  <p>UPDATE #3 (Adding Mail Function)</p>
  
  <pre><code>try {
      mail(
          'to@email.com',
          'Subject of Email',
          $html,
          $headers
          );
      } catch (Exception $e) {
          echo ("ERROR: Email NOT sent, Exception: ".$e-&gt;getMessage());
      }
  </code></pre>
  
  <p>Example HTML (This is the message of the HTML email) (This is also in a class that is part of a XMLRPC service)</p>
  
  <pre><code>private function getHTML() {
      $html  = '&lt;html&gt;&lt;head&gt;&lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;';
      $html .= '&lt;table&gt;';
      $html .= '&lt;tr&gt;&lt;td&gt;many many rows like this&lt;/td&gt;&lt;/tr&gt;';
      $html .= '&lt;tr&gt;&lt;td&gt;many many rows like this&lt;/td&gt;&lt;/tr&gt;';
      $html .= '&lt;tr&gt;&lt;td&gt;many many rows like this&lt;/td&gt;&lt;/tr&gt;';
      $html .= '&lt;tr&gt;&lt;td&gt;many many rows like this&lt;/td&gt;&lt;/tr&gt;';
      $html .= '&lt;tr&gt;&lt;td&gt;many many rows like this&lt;/td&gt;&lt;/tr&gt;';
      $html .= '&lt;/table&gt;';
      $html .= '&lt;/body&gt;';
      $html .= '&lt;/html&gt;';
  
      return $html;
      //return imap_8bit($html); // not working, nothing is captured in the error log
      //return imap_binary($html); // not working, nothing is captured in the error log
      // Both of these return the XMLRPC Fault Exception: 651 Failed to parse response
  }
  </code></pre>
  
  <p>Fault Exception: 651 Failed to parse response basically doesn't like the format or how the data is returned.</p>