On Apr 3, 2:36 pm, "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? > > like remove the fields below: > " > Return-Path: > X-Original-To: > Received: from [ > by (Postfix) with ESMTP id B32382613C > for Tue, 3 Apr 2007 09:54:28 -0300 (BRT) > Date: Tue, 03 Apr 2007 09:52:15 -0300 > From: <@> > To: > Subject: test > Message-Id: > MIME-Version: 1.0 > Content-Type: text/plain; charset="US-ASCII" > Content-Transfer-Encoding: 7bit > X-Mailer: Becky! ver. 2.24.02 [en] > X-UIDL: !Dn!!HKT!!/k > Status: RO > " > and only get this: > > this is a text message.. > .. > > Thanks
I found a tutorial on parsing email that should help you: http://www.devshed.com/c/a/Python/Python-Email-Libraries-SMTP-and-Email-Parsing/ Also see the email module: http://www.python.org/doc/2.3.5/lib/module-email.html Mike -- http://mail.python.org/mailman/listinfo/python-list