simple script to read and output Mailbox body to file.

Chuck Amadi chuck at
Tue Jun 8 10:49:41 CEST 2004

I have tried  breaking it down a bit as per your post.
when I run it I still dont see any results even to my output file .
Im logged in as myself ansd trying to access the mailbox on the mailserver 
which is mounted via nfs.The mail server has only version Python 1.5 So doesnt 
know about the email module.


output =('/tmp/SurveyResults','w')

fp = open("/var/spool/mail/chuck")

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

More information about the Python-list mailing list