Long attachment file name being truncated

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
phook
Forum Newbie
Posts: 3
Joined: Sun Nov 04, 2007 9:33 am

Long attachment file name being truncated

Post by phook »

I am trying to send a pdf file as an attachment with a long file name "ETicket7428-Lets Get Started in Digital Photography (Intensive Weekend) Level 1.pdf". When using V2 of Swift the file is sent OK with the file name intact. When using V3 the name is split into 2 parts, the first 59 chars. long and the remainder (see extract from headers below). The remainder is displayed in the email client. Is there anyway to retain the full file
name?

V3
Content-Type: application/pdf;
name*0="ETicket7424-Lets Get Started in Digital Photography (Intens";
name*1="ive 4 Morning) Level 1.pdf"
Content-Transfer-Encoding: base64
Content-Description: ETicket7424-Lets Get Started in Digital Photography
(Intensive 4 Morning) Level 1.pdf
Content-Disposition: attachment;
filename*0="ETicket7424-Lets Get Started in Digital Photography (In";
filename*1="tensive 4 Morning) Level 1.pdf"

V2
Content-Type: application/octet-stream; name="ETicket7428-Lets Get Started in Digital Photography (Intensive Weekend) Level 1.pdf";
Content-Transfer-Encoding: base64
Content-Description: ETicket7428-Lets Get Started in Digital Photography (Intensive Weekend) Level 1.pdf
Content-Disposition: attachment; filename="ETicket7428-Lets Get Started in Digital Photography (Intensive Weekend) Level 1.pdf"
afwt
Forum Newbie
Posts: 15
Joined: Fri Sep 21, 2007 2:53 pm

Post by afwt »

I am experiencing the exact same thing. Sometimes it even messes up the remaining of the filename, but I guess that is related to the filename itself....

I tried sending emails from GMail, Outlook, PHPMailer and SwiftMailer, and SM is the only one that is splitting attachment headers into multiple lines... :-(
phook
Forum Newbie
Posts: 3
Joined: Sun Nov 04, 2007 9:33 am

Re: Long attachment file name being truncated

Post by phook »

Does anybody know if this has been fixed or if it is something I am doing wrong - thanks in advance
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Long attachment file name being truncated

Post by Chris Corbyn »

Fixed in version 4, but that's not released yet sorry.
phook
Forum Newbie
Posts: 3
Joined: Sun Nov 04, 2007 9:33 am

Re: Long attachment file name being truncated

Post by phook »

Thanks Chris - cant wait for V4. Hope you are enjoying Melbourne
Post Reply