PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Attachment name size

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Mail
View previous topic :: View next topic  
Author Message
magictex



Joined: 11 Mar 2009
Posts: 2

PostPosted: Wed Mar 11, 2009 12:28 pm    Post subject: Attachment name size Reply with quote

Hi everybody,

I have a problem with the name of the file that I am sending as an attachment with the Mail_mime and then with send(), I explain :

my $file_name string lenght is more than 100 characters long, and that the attachment name works only if < 60 chars... Mail is being sent, attanchment is effectively included, but renamed to something like ATT01234.DAT

Anybody has an idea to help me pls ?



My code :
...
$mime->addAttachment($file_data, 'application/octet-stream', $file_name, 0);
$body = $mime->get();
$headers = $mime->headers($headers);

$object_mail =& Mail::factory('smtp', $param);
$object_mail ->send($adresses, $headers, $body);
Back to top
View user's profile Send private message
magictex



Joined: 11 Mar 2009
Posts: 2

PostPosted: Thu Mar 12, 2009 3:04 pm    Post subject: Reply with quote

To close the subject :

actually it seem that's a SMTP problem, outlook tahing charge of filenames <= 60 chars.

Resolved by cutting the lenght of filename submitted by user.
Back to top
View user's profile Send private message
brennanw



Joined: 20 May 2010
Posts: 8

PostPosted: Thu May 20, 2010 11:38 pm    Post subject: Reply with quote

Good to know...I haven't run into this issue yet but I'm sure I will at some point. Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Mail All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement