Trying to understand rfc822.Message() behaviour
Phoe6
orsenthil at gmail.com
Thu Nov 30 13:42:04 EST 2006
Fredrik Lundh wrote:
> Phoe6 wrote:
>
> > Have a look at this snippet, I have a file direct.txt and I want to
> > read it as rfc8222.Message() so that I get the Subject: and Mood: as
> > Dict Keys and content separately, but I am unable to get the Content
> > Properly.
>
> because the rfc822.Message parser only reads the header; to read the
> rest, just call "read" on the file object after you've parsed the header.
>
> see
>
> http://effbot.org/librarybook/rfc822.htm
>
Thank you. That helped me best to understand the rfc822 module.
Thanks,
Senthil
More information about the Python-list
mailing list