Page 1 of 1

Swift Mailer Question - Multipart emails show as Attachments

Posted: Wed Aug 16, 2006 1:24 pm
by mikedub
Hello all.

I'm using Swift Mailer to send HTML email newsletters. It's a small user base, so I prefer to handle everything with swift.

Anywho, my problem/query is this: When sending multipart emails, at least in Thunderbird, the test emails I'm sending myself arrive in my inbox showing that they have attachments.

This only happens when I'm using multipart emails. For example:

Code: Select all

$mailer->addPart('Plain Text Email');
$mailer->addPart('<i>HTML EMAIL</i>', 'text/html');
It also happens if I include only the "Plain Text Email" line, so that the 'HTML EMAIL' line isn't added as a part. BUT, when I use something like:

Code: Select all

$mailer->send('email@addr.com', 'Me <me@email.com>','my subject','my body');
...it doesn't show up in my mail client as having an 'attachment.'

Any ideas as to why this is happening? It's not a huge deal, but these days people are less likely to open an email with what looks like an attachment.

Posted: Wed Aug 16, 2006 1:55 pm
by Chris Corbyn
It shouldn't be showing them as attachments but in any case:

Code: Select all

$mailer->send('email@addr.com', 'Me <me@email.com>','my subject','my body');
Should be like this for multipart:

Code: Select all

$mailer->send('email@addr.com', 'Me <me@email.com>','my subject');
(No body since you've already given that before hand)

EDIT | Sorry I misread your email. This is the first report of this and I have lots of users so I'm a little confused. Are you able to send me the entire script, you Swift Version Number, your PHP version and also a forwarded copy of the email with all headers in-tact.

Thanks,

d11

Posted: Wed Aug 16, 2006 1:59 pm
by mikedub
Right, I used use the code containing 'My Body' as an example to show that it did not produce an attachment.

I've checked this against both Thunderbird and MS Outlook 2003, and the multipart emails that are being sent are showing up as having attachments when they are received in both clients. Once you open the message, the 'attachment icon' goes away.

I know it's very odd.. but I assure you it really is happening. I'll send screen shots if need be :P

Edit: I sure can... though I don't want to post it in the forum. Where should i send the info?

Posted: Wed Aug 16, 2006 2:02 pm
by Chris Corbyn

Posted: Wed Aug 16, 2006 2:27 pm
by mikedub
Emails sent! Thanks for looking into this.