a python script which will parse an email message
Skip Montanaro
skip at pobox.com
Mon May 31 13:21:52 EDT 2004
More information about the Python-list mailing list
Mon May 31 13:21:52 EDT 2004
- Previous message (by thread): trivial patch for SimpleHTTPServer reporting wrong content-length for text files
- Next message (by thread): a python script which will parse an email message
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message (by thread): trivial patch for SimpleHTTPServer reporting wrong content-length for text files
- Next message (by thread): a python script which will parse an email message
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list