a python script which will parse an email message

chuck amadi chuck.amadi at ntlworld.com
Mon May 31 18:48:15 EDT 2004


Skip Montanaro wrote:

>    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
>
>  
>
Cheers for getting me on the write track.take a look at it tomorrow .





More information about the Python-list mailing list