title: CDO message: text attachment gets corrupted
body: <p>I'm creating an email message using CDO object (and VB6, but that doesn't really matter).</p>
  
  <pre class="lang-vb prettyprint-override"><code>With New CDO.Message
    .To = "&lt;address&gt;"
    .Subject = "Manifest test 8"
    .Organization = "&lt;company&gt;"
    .From = "&lt;address&gt;"
    .Sender = .From
  
    With .Configuration
      .Fields(cdoSendUsingMethod).Value = cdoSendUsingPort
      .Fields(cdoSMTPServer).Value = "192.168.0.4"
      .Fields.Update
    End With
  
    With .AddAttachment("c:\import\customermanifestOURACCOUNT11122008110032.dat")
      .Fields(cdoContentDisposition).Value = "attachment; filename=""Consignor.dat"""
      .Fields.Update
    End With
  
    .Send
  End With
  </code></pre>
  
  <p>As you can see, the message is empty and contains an attachment that I rename in the email.</p>
  
  <p>The attachment is an ASCII text file, fixed-width, that contains some output from our systems, one record per line, separated with CRLF.</p>
  
  <p>When the message gets sent, <strong>all CRs get stripped out the attachment, so the receiver gets a file that only has LFs and therefore is corrupted.</strong></p>
  
  <p>I tried to change <code>ContentEncoding</code> to 7bit and base64, didn't work.</p>
  
  <p>I tried to set <code>ContentMediaType</code> for the attachment to <code>text/plain</code>, didn't work.</p>
  
  <p>I tried to not rename the attachment after adding, didn't work.</p>
  
  <p>The <code>ContentMediaType</code> for the attachment is set to <code>application/octet-stream</code> by default, so I can't figure out why (and by what) it gets changed in the first place.</p>
  
  <p>If I execute <code>.SaveToFile()</code> on the attachment right after <code>.Send()</code>, it saves valid file on the disk.</p>
  
  <p>Is this a problem in my code, or is it a mail server setting or something?</p>