• Home
  • Raw
  • Download

Lines Matching full:email

1 :mod:`email` --- An email and MIME handling package
4 .. module:: email
5 :synopsis: Package supporting the parsing, manipulating, and generating email messages,
14 The :mod:`email` package is a library for managing email messages, including
18 :mod:`mimecntl`. It is specifically *not* designed to do any sending of email
20 modules such as :mod:`smtplib` and :mod:`nntplib`. The :mod:`email` package
25 The primary distinguishing feature of the :mod:`email` package is that it splits
26 the parsing and generating of email messages from the internal *object model*
27 representation of email. Applications using the :mod:`email` package deal
36 The following sections describe the functionality of the :mod:`email` package.
38 email message is read as flat text from a file or other source, the text is
39 parsed to produce the object structure of the email message, this structure is
47 the :mod:`email` package provides, the exception classes you might encounter
48 while using the :mod:`email` package, some auxiliary utilities, and a few
50 of the :mod:`email` package, a section on differences and porting is provided.
52 Contents of the :mod:`email` package documentation:
56 email.message.rst
57 email.parser.rst
58 email.generator.rst
59 email.mime.rst
60 email.header.rst
61 email.charset.rst
62 email.encoders.rst
63 email.errors.rst
64 email.util.rst
65 email.iterators.rst
66 email-examples.rst
83 This table describes the release history of the email package, corresponding to
86 Python version the change was made in, *not* the email package version. This
90 | email version | distributed with | compatible with |
101 Here are the major differences between :mod:`email` version 4 and version 3:
104 the version 3 module :mod:`email.Message` was renamed to :mod:`email.message` in
107 * A new subpackage :mod:`email.mime` was added and all the version 3
108 :mod:`email.MIME\*` modules were renamed and situated into the :mod:`email.mime`
109 subpackage. For example, the version 3 module :mod:`email.MIMEText` was renamed
110 to :mod:`email.mime.text`.
114 * The :mod:`email.mime.application` module was added, which contains the
115 :class:`~email.mime.application.MIMEApplication` class.
122 return types for :func:`Message.get_param <email.message.Message.get_param>`
130 Here are the major differences between :mod:`email` version 3 and version 2:
132 * The :class:`~email.parser.FeedParser` class was introduced, and the
133 :class:`~email.parser.Parser` class was implemented in terms of the
134 :class:`~email.parser.FeedParser`. All parsing therefore is
141 :class:`~email.mime.text.MIMEText` constructor, the
148 argument to the :class:`~email.parser.Parser` class. These are expected to
153 Here are the differences between :mod:`email` version 2 and version 1:
155 * The :mod:`email.Header` and :mod:`email.Charset` modules have been added.
157 * The pickle format for :class:`~email.message.Message` instances has changed.
160 and unpickles :class:`~email.message.Message` instances, be aware that in
161 :mod:`email` version 2, :class:`~email.message.Message` instances now have
164 * Several methods in the :class:`~email.message.Message` class have been
166 added. See the documentation for the :class:`~email.message.Message` class
170 content types. In :mod:`email` version 1, such a type would be represented
172 :meth:`~email.message.Message.is_multipart` returned false,
173 :meth:`~email.message.Message.get_payload` was not a list object, but a
174 single :class:`~email.message.Message` instance.
178 :mod:`email` version 2, the container *does* return ``True`` from
179 :meth:`~email.message.Message.is_multipart`, and
180 :meth:`~email.message.Message.get_payload` returns a list containing a single
181 :class:`~email.message.Message` item.
185 :meth:`~email.message.Message.get_payload`, you should be fine. You just need
186 to make sure your code doesn't do a :meth:`~email.message.Message.set_payload`
187 with a :class:`~email.message.Message` instance on a container with a content
190 * The :class:`~email.parser.Parser` constructor's *strict* argument was added,
191 and its :meth:`~email.parser.Parser.parse` and
192 :meth:`~email.parser.Parser.parsestr` methods grew a *headersonly* argument.
193 The *strict* flag was also added to functions :func:`email.message_from_file`
194 and :func:`email.message_from_string`.
197 <email.generator.Generator.flatten>` instead. The
198 :class:`~email.generator.Generator` class has also grown the
199 :meth:`~email.generator.Generator.clone` method.
201 * The :class:`~email.generator.DecodedGenerator` class in the
202 :mod:`email.generator` module was added.
205 :class:`~email.mime.nonmultipart.MIMENonMultipart` and
206 :class:`~email.mime.multipart.MIMEMultipart` have been added, and interposed
209 * The *_encoder* argument to the :class:`~email.mime.text.MIMEText` constructor
213 * The following functions in the :mod:`email.Utils` module have been deprecated:
218 * The non-public function :func:`email.Iterators._structure` was added.
224 The :mod:`email` package was originally prototyped as a separate library called
229 :mod:`email` package, albeit often in a different way. Backward compatibility
230 between the :mod:`mimelib` package and the :mod:`email` package was not a
234 the :mod:`email` packages, along with hints on how to port your applications.
237 package name has been changed to :mod:`email`. In addition, the top-level
244 The :class:`~email.message.Message` class has the following differences:
247 :meth:`~email.message.Message.as_string`.
250 :meth:`~email.message.Message.is_multipart`.
252 * The :meth:`~email.message.Message.get_payload` method has grown a *decode*
256 :meth:`~email.message.Message.get_all`.
259 :meth:`~email.message.Message.add_header`.
268 :meth:`~email.message.Message.get_params`. Also, whereas :meth:`getparams`
269 returned a list of strings, :meth:`~email.message.Message.get_params` returns
274 :meth:`~email.message.Message.get_param`.
277 :meth:`~email.message.Message.get_charsets`.
280 :meth:`~email.message.Message.get_filename`.
283 :meth:`~email.message.Message.get_boundary`.
286 :meth:`~email.message.Message.set_boundary`.
290 :meth:`~email.message.Message.get_payload` method.
293 supported by the :class:`~email.generator.DecodedGenerator` class in the
294 :mod:`email.generator` module.
298 :func:`~email.iterators.typed_subpart_iterator` in the :mod:`email.iterators`
301 The :class:`~email.parser.Parser` class has no differences in its public
304 :class:`~email.message.Message` instance containing separate
305 :class:`~email.message.Message` subparts for each header block in the delivery
308 The :class:`~email.generator.Generator` class has no differences in its public
309 interface. There is a new class in the :mod:`email.generator` module though,
310 called :class:`~email.generator.DecodedGenerator` which provides most of the
316 * The :class:`~email.mime.base.MIMEBase` class constructor arguments *_major*
330 Also, the :class:`~email.mime.message.MIMEMessage` class now represents any
338 :mod:`email.utils` module.
341 closely supported in the :func:`~email.iterators.body_line_iterator` function
342 in the :mod:`email.iterators` module.