Mailing List Archive

RFC822 & Text of Mail Message
Greetings!

Here is what I want to do but cannot find out how. I am using RFC822
to parse out the headers and store them somewhere which works just fine.
But I am also in need of getting the text of the incoming message. So
what module would I use to also capture the message text. I see no way
of doing this via rfc822 module since it's not designed to do such
things. WOuld I use mimetools? And if so, how?

Thanks!

-Glen Collins



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
RFC822 & Text of Mail Message [ In reply to ]
From: jam <jam@newimage.com>

On Fri, Jul 02, 1999 at 03:07:03PM +0000, gcollins99@my-deja.com wrote:
>
> Greetings!
>
> Here is what I want to do but cannot find out how. I am using RFC822
> to parse out the headers and store them somewhere which works just fine.
> But I am also in need of getting the text of the incoming message. So
> what module would I use to also capture the message text. I see no way
> of doing this via rfc822 module since it's not designed to do such
> things. WOuld I use mimetools? And if so, how?
>
> Thanks!
>
> -Glen Collins
>

hi.

take a look at 'mailbox.py' in the standard library distribution for an example
of how to do this. it boils down to calling 'rewindbody' and the 'read'ing
the data like any normal file.

good luck ! ;)

regards,
J
--
|| visit gfd <http://quark.newimage.com/>
|| psa member #293 <http://www.python.org/>
|| New Image Systems & Services, Inc. <http://www.newimage.com/>
RFC822 & Text of Mail Message [ In reply to ]
From: gcollins99@my-deja.com

Greetings!

Here is what I want to do but cannot find out how. I am using RFC822
to parse out the headers and store them somewhere which works just fine.
But I am also in need of getting the text of the incoming message. So
what module would I use to also capture the message text. I see no way
of doing this via rfc822 module since it's not designed to do such
things. WOuld I use mimetools? And if so, how?

Thanks!

-Glen Collins



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
RFC822 & Text of Mail Message [ In reply to ]
On Fri, Jul 02, 1999 at 03:07:03PM +0000, gcollins99@my-deja.com wrote:
>
> Greetings!
>
> Here is what I want to do but cannot find out how. I am using RFC822
> to parse out the headers and store them somewhere which works just fine.
> But I am also in need of getting the text of the incoming message. So
> what module would I use to also capture the message text. I see no way
> of doing this via rfc822 module since it's not designed to do such
> things. WOuld I use mimetools? And if so, how?
>
> Thanks!
>
> -Glen Collins
>

hi.

take a look at 'mailbox.py' in the standard library distribution for an example
of how to do this. it boils down to calling 'rewindbody' and the 'read'ing
the data like any normal file.

good luck ! ;)

regards,
J
--
|| visit gfd <http://quark.newimage.com/>
|| psa member #293 <http://www.python.org/>
|| New Image Systems & Services, Inc. <http://www.newimage.com/>