Multi-part boundary string displayed at end of HTML body

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
User avatar
batfastad
Forum Contributor
Posts: 433
Joined: Tue Mar 30, 2004 4:24 am
Location: London, UK

Multi-part boundary string displayed at end of HTML body

Post by batfastad »

Hi everyone
I'm currently changing/upgrading our custom mailing list script from phpMailer to SwiftMailer - I cannot wait to get it all configured and working!
The Decorator plugin is working excellently!:D

However using my test list, the multi-part boundary text seems to get displayed at the bottom of the HTML part, in Thunderbird at least.
When I view the message source I notice the following appended to the very bottom of the email:

Code: Select all

--_=_swift-109523997248f314416c4
396.91989810_=_--
When I switch Thunderbird to showing the mail as plain text only, the multi-part boundary doesn't display.
When I view the source of the email, the following multi-part boundary is also shown after the headers at the top, then between the plain text and HTML parts

Code: Select all

--_=_swift-109523997248f314416c4396.91989810_=_
So I'm guessing the problem is because of the linebreak that appears in the middle of the multi-part boundary at the bottom of the email.
That's causing Thunderbird to display the text as it thinks it's still part of the HTML body. That linebreak means it's no longer the exact string of the multi-part boundary.

Is there a reason why this phantom linebreak is appearing right in the middle of the multi-part boundary?
I see some other threads here discussing extra linebreaks appearing in emails.

Any info or explanations as to why this is happening?

Cheers, Ben
User avatar
batfastad
Forum Contributor
Posts: 433
Joined: Tue Mar 30, 2004 4:24 am
Location: London, UK

Re: Multi-part boundary string displayed at end of HTML body

Post by batfastad »

Ok this is now solved! :lol:

I switched the script to run on our intranet PHP5/Apache server and now it works perfectly!
The bottom multi-part boundary comes through all on 1 line, and therefore no longer gets displayed at the bottom of the message.

The only strange thing is why it works on our intranet server, but not on one of our web hosts?!
Hope this helps someone out

Cheers, B
Post Reply