4 Here are a few examples of how to use the :mod:`email` package to read, write,
5 and send simple email messages, as well as more complex MIME messages.
7 First, let's see how to create and send a simple text message:
9 .. literalinclude:: ../includes/email-simple.py
12 Here's an example of how to send a MIME message containing a bunch of family
13 pictures that may be residing in a directory:
15 .. literalinclude:: ../includes/email-mime.py
18 Here's an example of how to send the entire contents of a directory as an email
21 .. literalinclude:: ../includes/email-dir.py
24 Here's an example of how to unpack a MIME message like the one
25 above, into a directory of files:
27 .. literalinclude:: ../includes/email-unpack.py
29 Here's an example of how to create an HTML message with an alternative plain
32 .. literalinclude:: ../includes/email-alternative.py
37 .. [1] Thanks to Matthew Dixon Cowles for the original inspiration and examples.
38 .. [2] Contributed by Martin Matejek.