title: How to send a csv attachment with lines longer than 990 characters?
body: <p>Alright. I thought this problem had something to do with my rails app, but it seems to have to do with the deeper workings of email attachments.</p>
  
  <p>I have to send out a csv file from my rails app to a warehouse that fulfills orders places in my store. The warehouse has a format for the CSV, and ironically the header line of the CSV file is super long (1000+ characters).</p>
  
  <p>I was getting a line break in the header line of the csv file when I received the test emails and couldn't figure out what put it there. However, some googling has finally showed the reason: attached files have a line character limit of 1000. Why? I don't know. It seems ridiculous, but I still have to send this csv file somehow.</p>
  
  <p>I tried manually setting the MIME type of the attachment to text/csv, but that was no help. Does anybody know how to solve this problem?</p>
  
  <p>Some relevant google results : <a href="http://www.google.com/search?client=safari&amp;rls=en&amp;q=csv+wrapped+990&amp;ie=UTF-8&amp;oe=UTF-8">http://www.google.com/search?client=safari&amp;rls=en&amp;q=csv+wrapped+990&amp;ie=UTF-8&amp;oe=UTF-8</a></p>
  
  <p><strong>update</strong></p>
  
  <p>I've tried encoding the attachment in base64 like so:</p>
  
  <pre><code>    attachments['205.csv'] = {:data=&gt; ActiveSupport::Base64.encode64(@string), :encoding =&gt; 'base64', :mime_type =&gt; 'text/csv'}
  </code></pre>
  
  <p>That doesn't seem to have made a difference. I'm receiving the email with a me.com account via Sparrow for Mac. I'll try using gmail's web interface.</p>