Commit Graph

21 Commits

Author SHA1 Message Date
Barry Warsaw b110bad2d9 More RFC 2231 improvements for the email 4.0 package. As Mark Sapiro rightly
points out there are really two types of continued headers defined in this
RFC (i.e. "encoded" parameters with the form "name*0*=" and unencoded
parameters with the form "name*0="), but we were were handling them both the
same way and that isn't correct.

This patch should be much more RFC compliant in that only encoded params are
%-decoded and the charset/language information is only extract if there are
any encoded params in the segments.  If there are no encoded params then the
RFC says that there will be no charset/language parts.

Note however that this will change the return value for Message.get_param() in
some cases.  For example, whereas before if you had all unencoded param
continuations you would have still gotten a 3-tuple back from this method
(with charset and language == None), you will now get just a string.  I don't
believe this is a backward incompatible change though because the
documentation for this method already indicates that either return value is
possible and that you must do an isinstance(val, tuple) check to discriminate
between the two.  (Yeah that API kind of sucks but we can't change /that/
without breaking code.)

Test cases, some documentation updates, and a NEWS item accompany this patch.
2006-07-21 14:51:07 +00:00
Barry Warsaw 40ef0067ad Merge email package 4.0 from the sandbox, including documentation, test cases,
and NEWS updates.
2006-03-18 15:41:53 +00:00
Georg Brandl 89f000e7a8 Bug #1210001: typo in email doc 2005-06-04 10:01:15 +00:00
Barry Warsaw bb11386730 Big email 3.0 API changes, with updated unit tests and documentation.
Briefly (from the NEWS file):

- Updates for the email package:
  + All deprecated APIs that in email 2.x issued warnings have been removed:
    _encoder argument to the MIMEText constructor, Message.add_payload(),
    Utils.dump_address_pair(), Utils.decode(), Utils.encode()
  + New deprecations: Generator.__call__(), Message.get_type(),
    Message.get_main_type(), Message.get_subtype(), the 'strict' argument to
    the Parser constructor.  These will be removed in email 3.1.
  + Support for Python earlier than 2.3 has been removed (see PEP 291).
  + All defect classes have been renamed to end in 'Defect'.
  + Some FeedParser fixes; also a MultipartInvariantViolationDefect will be
    added to messages that claim to be multipart but really aren't.
  + Updates to documentation.
2004-10-03 03:16:19 +00:00
Fred Drake 7934bc23a8 Move a footnote to the end of the sentence, so the note mark won't
interfere with the flow of the sentence.
2003-01-29 05:10:27 +00:00
Barry Warsaw dd868d32e0 nits 2002-10-01 15:29:09 +00:00
Fred Drake fcc31b44d2 Split the long email package examples into separate files and use
\verbatiminput instead of the verbatim environment -- this does the "right
thing" regarding page breaks in long examples for the typeset formats, and
has nice benefits for the HTML version as well.
2002-10-01 14:17:10 +00:00
Barry Warsaw ea66abc6e2 Cleaned up the examples. 2002-10-01 04:48:06 +00:00
Barry Warsaw 5db478fa29 Proofread and spell checked, all except the Examples section (which
I'll do next).
2002-10-01 04:33:16 +00:00
Barry Warsaw 5b9da893d3 Vast update to email version 2. This could surely use proofreading. 2002-10-01 01:05:52 +00:00
Raymond Hettinger ca0383d3a3 Fix bug #573916. Sender and recipients reversed in email example. 2002-06-26 07:51:32 +00:00
Fred Drake 928051fb26 The "%" character does not need to be escaped in verbatim environments.
This closes SF bug #517811.
2002-02-15 04:12:59 +00:00
Barry Warsaw 5e17d20743 Add a clarification that the email package always deals in native line
endings, and that it is smtplib's job to convert those to RFC 2821
line endings when sending the message.
2001-11-16 22:16:04 +00:00
Barry Warsaw 2bb077f630 Finally fleshed out the examples section with 4 code samples! Some of
my own doing, some originally written by Matthew Dixon Cowles.
2001-11-05 17:50:53 +00:00
Andrew M. Kuchling 43dc1fc926 Minor grammar and typo fixes 2001-11-05 01:55:03 +00:00
Barry Warsaw dca939899d Fix minor cut-and-paste typo. 2001-10-09 19:37:51 +00:00
Barry Warsaw a55d132f08 Add documentation for the MIMEAudio class/module, contributed by
Anthony Baxter.
2001-10-09 19:14:17 +00:00
Fred Drake 90e687863b Markup adjustments. 2001-09-27 20:09:39 +00:00
Barry Warsaw c5f8fe3a27 Updates do email package documentation for markup, style, and
organization.
2001-09-26 22:21:52 +00:00
Fred Drake a6a885b6aa Start making some markup adjustments; Barry has indicated he will work on
this before we finish the integration, along with some restructuring.
2001-09-26 16:52:18 +00:00
Barry Warsaw 5e634638e6 The email package documentation, currently organized the way I think
Fred prefers.  I'm not sure I like this organization, so it may change.
2001-09-26 05:23:47 +00:00