The mimify module defines two functions to convert mail messages to
and from MIME format. The mail message can be either a simple message
or a so-called multipart message. Each part is treated separately.
Mimifying (a part of) a message entails encoding the message as
quoted-printable if it contains any characters that cannot be
represented using 7-bit ASCII. Unmimifying (a part of) a message
entails undoing the quoted-printable encoding. Mimify and unmimify
are especially useful when a message has to be edited before being
sent. Typical use would be:

unmimify message
edit message
mimify message
send message

The modules defines the following user-callable functions and
user-settable variables:

Copy the message in infile to outfile, converting parts to
quoted-printable and adding MIME mail headers when necessary.
infile and outfile can be file objects (actually, any
object that has a readline() method (for infile) or a
write() method (for outfile)) or strings naming the files.
If infile and outfile are both strings, they may have the
same value.

Copy the message in infile to outfile, decoding all
quoted-printable parts. infile and outfile can be file
objects (actually, any object that has a readline() method (for
infile) or a write() method (for outfile)) or strings
naming the files. If infile and outfile are both strings,
they may have the same value.
If the decode_base64 argument is provided and tests true, any
parts that are coded in the base64 encoding are decoded as well.

By default, a part will be encoded as quoted-printable when it
contains any non-ASCII characters (i.e., characters with the 8th bit
set), or if there are any lines longer than MAXLEN characters
(default value 200).