simple script to read and output Mailbox body to file.

Chuck Amadi chuck at smtl.co.uk
Tue Jun 8 17:26:41 CEST 2004


Hi using the breakdown script I managed this minis mail.read() just print mail.

mbox = mailbox.UnixMailbox(fp)
for mail in mbox:
	print mail
	break #just look at one message

Here's the output of the script. Cheers chuck

chuck at sevenofnine:~/pythonScript> python testmail.py
Return-Path: <testwwws at smtl.co.uk>
Received: from enterprise.smtl.co.uk (enterprise.smtl.co.uk [193.131.77.1***])
        by ds9.smtl.co.uk (8.12.10/8.11.0) with ESMTP id i4PDJXgN006468
        for <testwwws at smtl.co.uk>; Tue, 25 May 2004 14:19:35 +0100
Message-Id: <200405251319.i4PDJXgN006468 at ds9.smtl.co.uk>
Subject: WWW Survey
To: testwwws at smtl.co.uk
From: testwwws at smtl.co.uk
Date: Tue, 25 May 2004 14:19:14 +0100
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on ds9.smtl.co.uk
X-Spam-Status: No, hits=0.3 required=5.0 tests=NO_REAL_NAME autolearn=no
        version=2.63
X-Spam-Level:
 
chuck at sevenofnine:~/pythonScript>







More information about the Python-list mailing list