import rfc822 # email headers and such

Matthew Dixon Cowles matt at mondoinfo.com
Tue Aug 15 19:50:48 EDT 2000


On Tue, 15 Aug 2000 15:33:01 -0400, Thomas Gagne
<tgagne at ix.netcom.com> wrote:

>I may soon have the need to accept as input to Python an email
>message that will either a) have an XML document attached to it or b)
>have XML as the body of the message.  I don't see mothods int he
>rfc822 module for accessing the body, or attachments, much less
>decoding them if necessary.  Maybe there's another module for that?

For accessing the body of a message, rfc822.py leaves its input object
at the beginning of the body, so you can just read the body from the
object you originally gave it. For MIME decoding, you may want to have
a look at the standard modules mimetools.py and MimeWriter.py and also
Michael P. Reilly's mimecntl.py which is at:

http://starship.python.net/crew/arcege/modules/

Regards,
Matt



More information about the Python-list mailing list