title: File name from attachment via mail mime php
body: <p>I'm having a problem using long file names in attachment send by mime mail.</p>
  
  <p>When I use shortnames, like: <code>rapport.pdf</code> it works fine. </p>
  
  <p>But when I start using long file names like: <code>rapport_2013_rapport_2013_rapport_2013_rapport_2013_rapport_2013_.pdf</code> the file gets a new name when sending the file to the e-mail (untiteled attchment <code>xxxxx.pdf</code>).</p>
  
  <p>Is there a way to fix this? I already tried to change the encode to inline or attachments.
  This is the code i use:</p>
  
  <pre><code> $mime = new Mail_Mime();
   $mime-&gt;setHtmlBody($htmlMessage);
   $mime-&gt;addAttachment($pdfcontent, 'application/pdf', 'factuur_QW'.$fcnr.'.pdf', false, 'base64');
   $body = $mime-&gt;get();
   $hdrs = $mime-&gt;headers($headers);
   $mail = &amp;Mail::factory('mail');
   $mail-&gt;send($to, $hdrs, $body); 
  </code></pre>