email - Read Using mailbox python -


i'm using linux os. objective convert pst file mbox & read data using mailbox library python. used readpst convert , store in /tmp/ temporary purpose

readpst -rs input.pst -o /tmp/

"readpst" has extracted/converted expected. wanted read mail using mailbox library.

i have tried following code.

import mailbox mbox = mailbox.mbox('/tmp/personal folder/inbox/mbox') message in mbox:     print message['subject'] 

but not working coz, no mbox file not found. while using readpst tool not created - "mbox" file.

i've tried read mbox using "mail" as

mail -f /tmp/personal folder/inbox , worked. but, wanted read subject using python.

use

readpst -r file.pst -o /tmp/ create mbox file in respective file. rather

readpst -rs file.pst -o /tmp/


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -