f | |
| :mod:`mimify` --- MIME processing of mail messages |
| ================================================== |
| |
| .. module:: mimify |
| :synopsis: Mimification and unmimification of mail messages. |
n | :deprecated: |
| |
| |
| .. deprecated:: 2.3 |
| The :mod:`email` package should be used in preference to the :mod:`mimify` |
| module. This module is present only to maintain backward compatibility. |
| |
| The :mod:`mimify` module defines two functions to convert mail messages to and |
n | from MIME format. The mail message can be either a simple message or a so- |
n | from MIME format. The mail message can be either a simple message or a |
| called multipart message. Each part is treated separately. Mimifying (a part |
| 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 |
| |
| .. function:: mime_encode_header(line) |
| |
| Return a MIME-encoded version of the header line in *line*. |
| |
| |
| .. data:: MAXLEN |
| |
t | By default, a part will be encoded as quoted-printable when it contains any non- |
t | By default, a part will be encoded as quoted-printable when it contains any |
| ASCII characters (characters with the 8th bit set), or if there are any lines |
| non-ASCII characters (characters with the 8th bit set), or if there are any |
| longer than :const:`MAXLEN` characters (default value 200). |
| lines longer than :const:`MAXLEN` characters (default value 200). |
| |
| |
| .. data:: CHARSET |
| |
| When not specified in the mail headers, a character set must be filled in. The |
| string used is stored in :const:`CHARSET`, and the default value is ISO-8859-1 |
| (also known as Latin1 (latin-one)). |
| |