6 Here are a few examples of how to use the :mod:`email` package to read, write,
7 and send simple email messages, as well as more complex MIME messages.
9 First, let's see how to create and send a simple text message:
11 .. literalinclude:: ../includes/email-simple.py
14 Here's an example of how to send a MIME message containing a bunch of family
15 pictures that may be residing in a directory:
17 .. literalinclude:: ../includes/email-mime.py
20 Here's an example of how to send the entire contents of a directory as an email
23 .. literalinclude:: ../includes/email-dir.py
26 Here's an example of how to unpack a MIME message like the one
27 above, into a directory of files:
29 .. literalinclude:: ../includes/email-unpack.py
31 Here's an example of how to create an HTML message with an alternative plain
34 .. literalinclude:: ../includes/email-alternative.py
39 .. [1] Thanks to Matthew Dixon Cowles for the original inspiration and examples.
40 .. [2] Contributed by Martin Matejek.