python code to convert mail from pst to eml format

8.2k Views Asked by At

Is there any python code to convert outlook pst mails to eml format. Please also suggest for any such code in some other language. Thank you.

1

There are 1 best solutions below

1
On
import subprocess

def convert_pst_to_mbox(pstfilename, outputfolder):
    subprocess.call(['readpst', '-o', outputfolder, '-r', pstfilename])

Of course, you must install libpst utilities for that to work.