[Spambayes] Problems with unheader.py

Matthew Dixon Cowles matt@mondoinfo.com
Tue, 24 Sep 2002 21:02:11 -0500 (CDT)


Dear Greg,

> OK: anyone know how to get the raw message body from an
> email.Message object?

If the message is text/plain, you can use the Message's get_payload()
method. If the message is multipart, there isn't an easy way unless
the message has been parsed with the HeaderParser class. In that case
the body isn't parsed and get_payload() will return the raw body text.

Regards,
Matt