Trouble converting .mbox to .pst using the libratom library

293 Views Asked by At

Trying to use the libratom library to convert a gmail extract (saved as .mbox) to a .pst to be able to open it in MS Outlook. Not able to use already created software due to security reasons. Need to

The code I'm using is below:

import mailbox
import libratom
from tqdm import tqdm

mbox = mailbox.mbox('a.mbox')
pst = libratom.PST('b.pst')
for message in tqdm(mbox):
pst.add_message(message)
pst.close()

When running, I get this error: AttributeError: module 'libratom' has no attribute 'PST'.

mailbox and libratom are installed. Never used this library before, trying to understand this error. And how to accomplish the above. Any help is welcome!

P.S. To use a third party library like Aspose.Email for Python via .NET, I need a licence, which I do not have.

0

There are 0 best solutions below