mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Adding an example of reproducing the rfc822.Message() parsing.
This commit is contained in:
parent
d9b7d48a82
commit
78a44c5428
2 changed files with 23 additions and 0 deletions
|
@ -11,6 +11,12 @@ First, let's see how to create and send a simple text message:
|
|||
.. literalinclude:: ../includes/email-simple.py
|
||||
|
||||
|
||||
And parsing RFC822 headers can easily be done by the parse(filename) or
|
||||
parsestr(message_as_string) methods of the Parser() class:
|
||||
|
||||
.. literalinclude:: ../includes/email-headers.py
|
||||
|
||||
|
||||
Here's an example of how to send a MIME message containing a bunch of family
|
||||
pictures that may be residing in a directory:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue