so get two strings: only headers, and the whole message.
find the length of the headers, and chop that off the beginning of the whole
message:
message=whole_message[len(headers):None]
You can omit the word None: it is just there for clarity purposes.
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?
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
--
http://mail.python.org/mailman/listinfo/python-list
--
http://mail.python.org/mailman/listinfo/python-list