multifile and mimetools to parse email folder

rdskar1 at home.com rdskar1 at home.com
Mon Jun 4 21:39:31 EDT 2001


I want to read through an email folder (I use mutt on debian, the
'folder' is a text file) and decode the attachments. I understand how
mimetools works, but I am having trouble
moving from message to message with multifile. I have been trying 
various combinations off multifile push, pop and readline methods, 
but I haven't hit on the right combinations.

infl=open('emailfile','r')
file=multifile.MultiFile(infl)
msg=mimetools.Message(file)
file.push(msg.getparam('boundary'))
file.next() repeat until returns 0
how do I get to the next message?

Thanks in advance, Bob



More information about the Python-list mailing list