eleith/emailjs — Issue #14: Strange line feeds appearing on certain mail servers for "long" html mails
Author: Hiverness
Created: 2011-11-24 14:41:06+00:00
State: open

Hi there!

When making relatively long html emails (no problem for the text part), on some mail servers, I will receive the email with various base64 encoded chunks separated by newline characters, which basically breaks email rendering. (ie: the client stops rendering the mail after the first chunk)

Some servers seem to "remove" the newline, others leave it there, (for example, gmail removes it, webfaction mail servers are leaving it there), which makes the problem appear only on certain servers.

I have two gists of the exact same email, sent at the same time. The "broken" one ended up in a server that "breaks" the email (webfaction), the other ended up in a server that renders it correctly (gmail).

broken: https://gist.github.com/1391472
correct: https://gist.github.com/1391476

I also tested a bunch of other stuffs such as changing the smtp server or the mail client but that doesn't seem to make any difference. I also directly contacted webfaction, who confirmed that they really received the mail with the newlines, they suspect that gmail removes them automatically to "fix" the mail.

I'm currently actively trying to fix this problem as it's preventing us to go live with a website at this moment, so I'll be more than willing to help fixing it on emailjs if it really comes from there. Any other pointer would be greatly appreciated if it doesn't!