summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2013-03-19 22:31:05 (GMT)
committerGregory P. Smith <greg@krypto.org>2013-03-19 22:31:05 (GMT)
commit2f4dfd1c071ce41d72cf1e95071cf3340f50b418 (patch)
tree0c3cdd563fee4eb11668133850848f59bcf2bef8
parentc70e53aca8c50367da0e51e5eada7d08121763d6 (diff)
parent90cb1050d31e35c45b49bc9c4bc7a286a0fae1e2 (diff)
downloadcpython-2f4dfd1c071ce41d72cf1e95071cf3340f50b418.zip
cpython-2f4dfd1c071ce41d72cf1e95071cf3340f50b418.tar.gz
cpython-2f4dfd1c071ce41d72cf1e95071cf3340f50b418.tar.bz2
merge heads
-rw-r--r--Doc/library/email.mime.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/email.mime.rst b/Doc/library/email.mime.rst
index db5584c..acaba1c 100644
--- a/Doc/library/email.mime.rst
+++ b/Doc/library/email.mime.rst
@@ -187,3 +187,13 @@ Here are the classes:
:class:`~email.mime.nonmultipart.MIMENonMultipart` constructor; it defaults
to ``us-ascii`` if the string contains only ``ascii`` codepoints, and
``utf-8`` otherwise.
+
+ 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).