XP is just a number | |
PerlMonks |
Re: RFC: Shortening line length in HTML Emailsby afoken (Chancellor) |
on Oct 27, 2016 at 18:44 UTC ( [id://1174852]=note: print w/replies, xml ) | Need Help?? |
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
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Meditations
|
|