email.message: Representing an email message — Python 3.16.0a0 documentation

docs.python.org

Tin mới

email — An email and MIME handling package

email.parser: Parsing email messages

Python Module Index

3.16.0a0 Documentation

The Python Standard Library

Internet Data Handling

email.policy.default

If policy is specified use the rules it specifies to update and serialize the representation of the message. If policy is not set, use the default policy, which follows the rules of the email RFCs except for line endings

email.message.Message

Flattening the message may trigger changes to the EmailMessage if defaults need to be filled in to complete the transformation to a string (for example, MIME boundaries may be generated or modified).

email.generator.Generator

Flattening the message may trigger changes to the EmailMessage if defaults need to be filled in to complete the transformation to a string (for example, MIME boundaries may be generated or modified).

mailbox.mboxMessage

Set the message’s envelope header to unixfrom, which should be a string. (See mboxMessage for a brief description of this header.)

email.headerregistry.BaseHeader

Return the value of the named header field. name does not include the colon field separator. If the header is missing, None is returned; a KeyError is never raised.

object.__getitem__

Return the value of the named header field. This is identical to __getitem__() except that optional failobj is returned if the named header is missing (failobj defaults to None).

email.utils.unquote()

Return the value of the filename parameter of the Content-Disposition header of the message. If the header does not have a filename parameter, this method falls back to looking for the name parameter on the Content-Type

email.errors.HeaderParseError

Set the boundary parameter of the Content-Type header to boundary. set_boundary() will always quote boundary if necessary. A HeaderParseError is raised if the message object has no Content-Type header.

email.contentmanager.ContentManager.get_content

Call the get_content() method of the content_manager, passing self as the message object, and passing along any other arguments or keywords as additional arguments. If content_manager is not specified, use the content_ma

provisional module

Originally added in 3.4 as a provisional module. Docs for legacy message class moved to email.message.Message: Representing an email message using the compat32 API.