[FIXED] setting the name of attachment fails

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
orixilus
Forum Newbie
Posts: 2
Joined: Mon Apr 09, 2007 11:56 am

[FIXED] setting the name of attachment fails

Post by orixilus »

Hi,

using the constructor of Swift_Message_Image to set the name of a file attachment didn't work for me:

Code: Select all

$img =& new Swift_Message_Image(new Swift_File('/path/to/file'),'name_of_file.ext');
this did the trick:

Code: Select all

$img =& new Swift_Message_Image(new Swift_File('/path/to/file'));
$img -> setFileName('name_of_file.ext');
am I doing something wrong or is it a bug?

I'm using Swift-3.1.2-php4 in php4.4.4

thanks and keep up the great work!
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

It appears to be a minor bug due the order in which the class is processing the arguments. I'll sort this out for tomorrow, but as you've discovered, using the actual setter will work fine :)

I'll be releasing an update tomorrow with 4 minor fixes in any case :)
orixilus
Forum Newbie
Posts: 2
Joined: Mon Apr 09, 2007 11:56 am

Post by orixilus »

ok, glad I could help! :)
Post Reply