• Home
  • Raw
  • Download

Lines Matching full:email

1 :mod:`email.parser`: Parsing email messages
4 .. module:: email.parser
5 :synopsis: Parse flat text email messages to produce a message object structure.
9 from whole cloth by instantiating :class:`~email.message.Message` objects and
10 stringing them together via :meth:`~email.message.Message.attach` and
11 :meth:`~email.message.Message.set_payload` calls, or they
12 can be created by parsing a flat text representation of the email message.
14 The :mod:`email` package provides a standard parser that understands most email
17 :class:`~email.message.Message` instance of the object structure. For simple,
20 return ``True`` from its :meth:`~email.message.Message.is_multipart` method, and
21 the subparts can be accessed via the :meth:`~email.message.Message.get_payload`
22 and :meth:`~email.message.Message.walk` methods.
29 a stream which might block waiting for more input (e.g. reading an email message
35 connection between the :mod:`email` package's bundled parser and the
36 :class:`~email.message.Message` class, so your custom parser can create message
45 The :class:`FeedParser`, imported from the :mod:`email.feedparser` module,
46 provides an API that is conducive to incremental parsing of email messages, such
47 as would be necessary when reading the text of an email message from a source
49 to parse an email message fully contained in a string or a file, but the classic
59 any problems it found in a message. See the :mod:`email.errors` module for the
69 defaults to the :class:`email.message.Message` class.
92 The :class:`Parser` class, imported from the :mod:`email.parser` module,
94 of the message are available in a string or file. The :mod:`email.parser`
108 :class:`~email.message.Message` (see :mod:`email.message`). The factory will
163 in the top-level :mod:`email` package namespace.
165 .. currentmodule:: email
171 with the :class:`~email.parser.Parser` class constructor.
181 are interpreted as with the :class:`~email.parser.Parser` class constructor.
188 >>> import email
189 >>> msg = email.message_from_string(myString)
199 :meth:`~email.message.Message.is_multipart`. Their
200 :meth:`~email.message.Message.get_payload` method will return a string object.
205 :meth:`~email.message.Message.is_multipart` and their
206 :meth:`~email.message.Message.get_payload` method will return the list of
207 :class:`~email.message.Message` subparts.
212 :meth:`~email.message.Message.is_multipart` method will return ``True``.
218 :meth:`~email.message.Message.is_multipart` method may return ``False``.
219 If such messages were parsed with the :class:`~email.parser.FeedParser`,
221 :class:`~email.errors.MultipartInvariantViolationDefect` class in their
222 *defects* attribute list. See :mod:`email.errors` for details.
226 .. [#] As of email package version 3.0, introduced in Python 2.4, the classic
227 :class:`~email.parser.Parser` was re-implemented in terms of the
228 :class:`~email.parser.FeedParser`, so the semantics and results are