diff options
author | Gregory P. Smith <greg@krypto.org> | 2013-03-19 22:25:28 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2013-03-19 22:25:28 (GMT) |
commit | 1f1ec04c7f0134b88623ca13db9a1e10647a12b1 (patch) | |
tree | 36856d8f9c148c640c0f2e395deedf227922fce4 | |
parent | dd351628942718ede440c8ffe6911f379c9e15b1 (diff) | |
parent | 14b0124a29489e4b114b960e4f2ce0b55acbace6 (diff) | |
download | cpython-1f1ec04c7f0134b88623ca13db9a1e10647a12b1.zip cpython-1f1ec04c7f0134b88623ca13db9a1e10647a12b1.tar.gz cpython-1f1ec04c7f0134b88623ca13db9a1e10647a12b1.tar.bz2 |
merge heads
-rw-r--r-- | Doc/library/email.mime.rst | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Doc/library/email.mime.rst b/Doc/library/email.mime.rst index ae340f7..2ce4868 100644 --- a/Doc/library/email.mime.rst +++ b/Doc/library/email.mime.rst @@ -185,5 +185,15 @@ Here are the classes: minor type and defaults to :mimetype:`plain`. *_charset* is the character set of the text and is passed as a parameter to the :class:`~email.mime.nonmultipart.MIMENonMultipart` constructor; it defaults - to ``us-ascii``. No guessing or encoding is performed on the text data. + to ``us-ascii``. + + Unless the ``_charset`` parameter is explicitly set to ``None``, the + MIMEText object created will have both a :mailheader:`Content-Type` header + with a ``charset`` parameter, and a :mailheader:`Content-Transfer-Endcoding` + header. This means that a subsequent ``set_payload`` call will not result + in an encoded payload, even if a charset is passed in the ``set_payload`` + command. You can "reset" this behavior by deleting the + ``Content-Transfer-Encoding`` header, after which a ``set_payload`` call + will automatically encode the new payload (and add a new + :mailheader:`Content-Transfer-Encoding` header). |