mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Add email example how to send a multipart message.
Written for GHOP by Martin Matejek.
This commit is contained in:
parent
c8088df363
commit
bbc4fc2933
2 changed files with 56 additions and 3 deletions
|
@ -16,18 +16,23 @@ pictures that may be residing in a directory:
|
|||
|
||||
|
||||
Here's an example of how to send the entire contents of a directory as an email
|
||||
message: [1]_
|
||||
message: [1]_
|
||||
|
||||
.. literalinclude:: ../includes/email-dir.py
|
||||
|
||||
|
||||
And finally, here's an example of how to unpack a MIME message like the one
|
||||
Here's an example of how to unpack a MIME message like the one
|
||||
above, into a directory of files:
|
||||
|
||||
.. literalinclude:: ../includes/email-unpack.py
|
||||
|
||||
Here's an example of how to create an HTML message with an alternative plain
|
||||
text version: [2]_
|
||||
|
||||
.. literalinclude:: ../includes/email-alternative.py
|
||||
|
||||
|
||||
.. rubric:: Footnotes
|
||||
|
||||
.. [1] Thanks to Matthew Dixon Cowles for the original inspiration and examples.
|
||||
|
||||
.. [2] Contributed by Martin Matejek.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue