I'm working on an email project. For reasons that I will not go into here, doing quoted-printable encoding on long email messages is problematic in the customer's environment.
Doing base64-encoding on the HTML and text sections of the SMTP emails we are sending seems like a viable option. In testing it, it seems to work just fine in a couple test clients (like Gmail).
However I'm wondering if this will present any issues across different email clients. From reading the RFC specs, it looks like base64 is a compliant encoding for text sections, but it's unusual enough for text & html sections that I'd like to know if there will be any potential issues to consider.
Things that seem like problematic possibilities:
Does anybody have experiences they can share? This seems like a good solution but I'd like to make sure I'm not missing something.
This is hard to answer -- yes, quoted-printable
is used more often simply because it wastes less bytes (on a mostly-ASCII text) and because the raw text of the mail body part resembles the decoded output (on a mostly-ASCII text). There is nothing which forbids using base64
for the textual message parts, though.
This is pretty much an open question -- you cannot ever be sure that a MUA somewhere is not hopelessly broken to the extent of not showing anything. There's a lot of "perhaps" in there, and you're right -- but the problem is that you will never know. If it will make you sleep better, the following companies all use base64-encoded HTML in the marketing spam I'm receiving:
Any MUA which can display embedded images has to include a base64 decoder. It is definitely possible that a MUA might explicitly refuse to use that code for decoding text/plain
and text/html
, but in that case, you're just screwed anyway.
As a fun fact, one of these companies is happy to break the UTF-8 encoded subject at the byte boundary, inside a multibyte character, and encode both halves of the text in separate encoded-words (RFC2047 terminology here).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With