Subject Author Date
Re: email module: long line problem Peter J. Holzer <hjp[at]wsr[dot]ac[dot]at> 23-04-2009
On 2009-04-23 18:31:12 +0200, Martin Bähr wrote:
> On Thu, Apr 23, 2009 at 10:19:58AM -0500, Dan Nelson wrote:
> > quoted-printable might be a better choice; if your data is mainly text it
> > will only be slightly larger than unencoded, and is still mostly readable
> > without decoding.
> does quoted-printable insert linebreaks to reduce long lines and remove
> them after decoding?

Yes. Both quoted-printable and base64 encodings are designed to be
transmitted over just about any mail infrastructure. This means:

Only printable US-ASCII characters.
No lines longer than 80 (76 actually) characters.
No lines with trailing whitespace.

You can encode binary content (and for the purpose of SMTP, everything
with lines longer than 998 characters is "binary") either as quoted
printable or as base-64. Most MUAs compute which encoding is shorter and
choose the shorter encoding.


   _  | Peter J. Holzer    | Auf jedem Computer sollte der Satz Ludwigs II
|_|_) | Sysadmin WSR       | eingeprägt stehen: "Ein ewig Rätsel will ich
| |   | <hjp[at]>      | bleiben, mir und andern."
__/   | |    -- Wolfram Heinrich in desd