email module - reading only the body

Tim Howarth tim at worthy.demon.co.uk
Tue Oct 7 03:29:54 EDT 2003


In message <3f81da94$0$97179$edfadb0f at dread12.news.tele.dk>
          Max M <maxm at mxm.dk> wrote:

> With the email module, how do I read the textual content of a simple
> email message?

   msg.get_payload()

but you may well want to check;

   if msg.get_main_type()=='text'

first.


-- 
___
 |im    ---- ARM Powered ----




More information about the Python-list mailing list