Function
email.quopriMIME.encode

Signature

encode(body, binary=False, maxlinelen=76, eol='\n')

Documentation String

Encode with quoted-printable, wrapping at maxlinelen characters.

If binary is False (the default), end-of-line characters will be converted to the canonical email end-of-line sequence \r\n. Otherwise they will be left verbatim.

Each line of encoded text will end with eol, which defaults to "\n". Set this to "\r\n" if you will be using the result of this function directly in an email.

Each line will be wrapped at, at most, maxlinelen characters (defaults to 76 characters). Long lines will have the `soft linefeed' quoted-printable character "=" appended to them, so the decoded text will be identical to the original text.