Brute force attempt: Encode the HTML as-is in base64. Append that base64 blob to the mail. Indicate in a mail header that the message is base64-encoded. (Content-Transfer-Encoding: base64 should be sufficient.) Base64 has nice short lines. Any mail client that can handle HTML should be able to handle base64-encoded HTML. You are already sending bloat. So that 33% overhead of base64 won't make it much worse.
Other option: Encode as quoted-printable (Content-Transfer-Encoding: quoted-printable), break hard after N characters (typically N=75), and append a "=" at the break (soft break). See also Quoted-printable. I think there are modules at CPAN that en- and decode QP. QP usually does not add that much overhead as Base64, but it requires a little bit more "thinking" than stupidly shifting bits from and to base64.
Alexander
In reply to Re: RFC: Shortening line length in HTML Emails
by afoken
in thread RFC: Shortening line length in HTML Emails
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |