title: Java linebreaks/newlines in CSV text email attachment breaks the complete attachment
body: <p>I'm mailing a CSV text file as an attachemt with Java which I generate in my program. If I add the string containing data (header and values), the attachment seems fine except for the fact that everything is on one line (i actually forgot about the linebreaks).  </p>
  
  <pre><code>MimeBodyPart attachPart = new MimeBodyPart();
  attachPart.setDataHandler(new DataHandler(new ByteArrayDataSource(s3_string.getBytes(), "text/csv")));
  multipart.addBodyPart(attachPart);
  </code></pre>
  
  <p>However, when I add linebreaks in the form of "\n" or "\r\n" in the string the whole attachment is messed up, I get stuff like
  "Content-Transfer-Encoding: 7bit
  Content-Disposition: attachment; etc etc"</p>
  
  <p>and whatnot in my original mail.</p>
  
  <p>Is there a way to add linebreaks to the CSV so that it becomes a valid CSV attachment?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Hello world!</p>