simple script to read and output Mailbox body to file.
Chuck Amadi
chuck at smtl.co.uk
Tue Jun 8 04:49:41 EDT 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.
Cheers
output =('/tmp/SurveyResults','w')
fp = open("/var/spool/mail/chuck")
mbox = mailbox.UnixMailbox(fp)
for mail in mbox:
print mail.read()
break #just look at one message
More information about the Python-list
mailing list