title: error on attachment file over email sent via perl script
body: <p>I'm using this <a href="http://www.akadia.com/services/email_attachments_using_perl.html" rel="nofollow">script</a> to send an email with attachment using perl</p>
  
  <p>The issue I do have is that I'm sending a <code>csv</code> file with some <code>formatting</code>, the send part goes very well without any error but when I receive the email, the attachment that has NO formatting with funny characters.   </p>
  
  <p>screen the file that I send - <a href="http://imgur.com/Gkkz26W" rel="nofollow">http://imgur.com/Gkkz26W</a><br>
  screen the file that I received - <a href="http://imgur.com/UMlXp3F" rel="nofollow">http://imgur.com/UMlXp3F</a></p>
  
  <p>Anyone understand why this is happening?</p>
  
  <pre><code>#!/usr/bin/perl
  
  use MIME::Lite;
  use Net::SMTP;
  
  ### Adjust sender, recipient and your SMTP mailhost
  my $from_address = 'martin dot zahn at akadia dot ch';
  my $to_address = 'martin dot zahn at akadia dot ch';
  my $mail_host = 'mailhost.domain.com';
  
  ### Adjust subject and body message
  my $subject = 'A message with 2 parts ...';
  my $message_body = "Here's the attachment file(s) you wanted";
  
  ### Adjust the filenames
  my $my_file_csv = 'my_file.csv';
  my $your_file_csv = 'your_file.csv';
  
  ### Create the multipart container
  $msg = MIME::Lite-&gt;new (
    From =&gt; $from_address,
    To =&gt; $to_address,
    Subject =&gt; $subject,
    Type =&gt;'multipart/mixed'
  ) or die "Error creating multipart container: $!\n";
  
  ### Add the text message part
  $msg-&gt;attach (
    Type =&gt; 'TEXT',
    Data =&gt; $message_body
  ) or die "Error adding the text message part: $!\n";
  
  ### Add the CSV file
  $msg-&gt;attach (
     Type =&gt; 'text/csv',
     Path =&gt; $my_file_csv,
     Filename =&gt; $your_file_csv,
     Disposition =&gt; 'attachment'
  ) or die "Error adding $file_csv: $!\n";
  
  ### Send the Message
  MIME::Lite-&gt;send('smtp', $mail_host, Timeout=&gt;60);
      $msg-&gt;send;
  </code></pre>