a python script which will parse an email message
Skip Montanaro
skip at pobox.com
Mon May 31 13:21:52 EDT 2004
chuck> Thus I home to get the body of the email messages as well using
chuck> print >> output, msg['body'] Thus the None will hopefully contain
chuck> Body Message Data.
Nope, that's not how you get the message body. Read the docs for the email
package:
http://www.python.org/doc/current/lib/module-email.html
In particular, check out the get_payload method of the email.Message module.
The dictionary-style access is only for getting header values and returns
None for missing headers.
Skip
More information about the Python-list
mailing list