summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-03-19 22:21:22 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-03-19 22:21:22 (GMT)
commit432a48a0c8b157fe09ed9cc09cd47754f0ef7eac (patch)
treeab36ee33063e77ee55d941c21f6dfbfacf7264f8 /Doc
parent41b977c453879b8c53a504546bfe803ec505987f (diff)
parent14b0124a29489e4b114b960e4f2ce0b55acbace6 (diff)
downloadcpython-432a48a0c8b157fe09ed9cc09cd47754f0ef7eac.zip
cpython-432a48a0c8b157fe09ed9cc09cd47754f0ef7eac.tar.gz
cpython-432a48a0c8b157fe09ed9cc09cd47754f0ef7eac.tar.bz2
Merge: #1525919: Document MIMEText+set_payload encoding behavior.
Diffstat (limited to 'Doc')
-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).