On 3 Apr 2007 12:36:10 -0700, flit <[EMAIL PROTECTED]> wrote: > Hello All, > > Using poplib in python I can extract only the headers using the .top, > there is a way to extract only the message text without the headers?
for i in range( M.stat()[0] ): # M.stat returns msg-count and mbox size msg = '\r\n'.join( M.retr(i+1)[1] ) # retrieve the email into string hdrs,body = msg.split('\r\n\r\n',1) # split it into hdrs & body HTH :) -- http://mail.python.org/mailman/listinfo/python-list