File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -187,3 +187,13 @@ Here are the classes:
187187 :class: `~email.mime.nonmultipart.MIMENonMultipart ` constructor; it defaults
188188 to ``us-ascii `` if the string contains only ``ascii `` codepoints, and
189189 ``utf-8 `` otherwise.
190+
191+ Unless the ``_charset `` parameter is explicitly set to ``None ``, the
192+ MIMEText object created will have both a :mailheader: `Content-Type ` header
193+ with a ``charset `` parameter, and a :mailheader: `Content-Transfer-Endcoding `
194+ header. This means that a subsequent ``set_payload `` call will not result
195+ in an encoded payload, even if a charset is passed in the ``set_payload ``
196+ command. You can "reset" this behavior by deleting the
197+ ``Content-Transfer-Encoding `` header, after which a ``set_payload `` call
198+ will automatically encode the new payload (and add a new
199+ :mailheader: `Content-Transfer-Encoding ` header).
You can’t perform that action at this time.
0 commit comments