File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,5 +185,15 @@ Here are the classes:
185185 minor type and defaults to :mimetype: `plain `. *_charset * is the character
186186 set of the text and is passed as a parameter to the
187187 :class: `~email.mime.nonmultipart.MIMENonMultipart ` constructor; it defaults
188- to ``us-ascii ``. No guessing or encoding is performed on the text data.
188+ to ``us-ascii ``.
189+
190+ Unless the ``_charset `` parameter is explicitly set to ``None ``, the
191+ MIMEText object created will have both a :mailheader: `Content-Type ` header
192+ with a ``charset `` parameter, and a :mailheader: `Content-Transfer-Endcoding `
193+ header. This means that a subsequent ``set_payload `` call will not result
194+ in an encoded payload, even if a charset is passed in the ``set_payload ``
195+ command. You can "reset" this behavior by deleting the
196+ ``Content-Transfer-Encoding `` header, after which a ``set_payload `` call
197+ will automatically encode the new payload (and add a new
198+ :mailheader: `Content-Transfer-Encoding ` header).
189199
You can’t perform that action at this time.
0 commit comments