Deprecated since version 2.3: The email package should be used in preference to the mimify module. This module is present only to maintain backward compatibility.
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:
This module can also be used from the command line. Usage is as follows:
mimify.py -e [-l length] [infile [outfile]] mimify.py -d [-b] [infile [outfile]]
to encode (mimify) and decode (unmimify) respectively. infile defaults to standard input, outfile defaults to standard output. The same file can be specified for input and output.
If the -l option is given when encoding, if there are any lines longer than the specified length, the containing part will be encoded.
If the -b option is given when decoding, any base64 parts will be decoded as well.
See also
18.8. MimeWriter — Generic MIME file writer
18.10. multifile — Support for files containing distinct parts
Enter search terms or a module, class or function name.