:class:`~email.policy.default` policy, which follows the rules of the email
RFCs except for line endings (instead of the RFC mandated ``\r\n``, it uses
the Python standard ``\n`` line endings). For more information see the
- :mod:`~email.policy` documentation.
+ :mod:`~email.policy` documentation. [2]_
.. method:: as_string(unixfrom=False, maxheaderlen=None, policy=None)
.. [1] Originally added in 3.4 as a :term:`provisional module <provisional
package>`. Docs for legacy message class moved to
:ref:`compat32_message`.
+
+.. [2] The :class:`EmailMessage` class requires a policy that provides a
+ ``content_manager`` attribute for content management methods like
+ ``set_content()`` and ``get_content()`` to work. The legacy
+ :const:`~email.policy.compat32` policy does not support these methods
+ and should not be used with :class:`EmailMessage`.
An instance of :class:`Compat32`, providing backward compatibility with the
behavior of the email package in Python 3.2.
+ .. note::
+
+ The :const:`compat32` policy should not be used as a policy for
+ :class:`~email.message.EmailMessage` objects, and should only be used
+ to serialize messages that were created using the :const:`compat32`
+ policy.
+
.. rubric:: Footnotes