@@ -156,7 +156,13 @@ Currently the email package provides only one concrete content manager,
156156       :exc: `ValueError `.
157157
158158       * For ``str `` objects, if *cte * is not set use heuristics to
159-          determine the most compact encoding.
159+          determine the most compact encoding.  Prior to encoding,
160+          :meth: `str.splitlines ` is used to normalize all line boundaries,
161+          ensuring that each line of the payload is terminated by the
162+          current policy's :data: `~email.policy.Policy.linesep ` property
163+          (even if the original string did not end with one).
164+        * For ``bytes `` objects, *cte * is taken to be base64 if not set,
165+          and the aforementioned newline translation is not performed.
160166       * For :class: `~email.message.EmailMessage `, per :rfc: `2046 `, raise
161167         an error if a *cte * of ``quoted-printable `` or ``base64 `` is
162168         requested for *subtype * ``rfc822 ``, and for any *cte * other than
@@ -191,13 +197,6 @@ Currently the email package provides only one concrete content manager,
191197       (distinguished from strings by having a ``name `` attribute), add the
192198       headers to *msg *.
193199
194-        Note that this method will append a newline character to the end of strings,
195-        if it wasn't passed already. For example, the following are equivalent ::
196- 
197-          msg = EmailMessage() 
198-          msg.set_content("hello") 
199-          msg.set_content("hello\n") 
200- 
201200
202201.. rubric :: Footnotes 
203202
0 commit comments