File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Original file line number Diff line number Diff line change @@ -157,7 +157,13 @@ Currently the email package provides only one concrete content manager,
157
157
:exc: `ValueError `.
158
158
159
159
* For ``str `` objects, if *cte * is not set use heuristics to
160
- determine the most compact encoding.
160
+ determine the most compact encoding. Prior to encoding,
161
+ :meth: `str.splitlines ` is used to normalize all line boundaries,
162
+ ensuring that each line of the payload is terminated by the
163
+ current policy's :data: `~email.policy.Policy.linesep ` property
164
+ (even if the original string did not end with one).
165
+ * For ``bytes `` objects, *cte * is taken to be base64 if not set,
166
+ and the aforementioned newline translation is not performed.
161
167
* For :class: `~email.message.EmailMessage `, per :rfc: `2046 `, raise
162
168
an error if a *cte * of ``quoted-printable `` or ``base64 `` is
163
169
requested for *subtype * ``rfc822 ``, and for any *cte * other than
You can’t perform that action at this time.
0 commit comments