Question

I am using mstor to read mbox email messages on windows machine, I am able to connect to the store, but when trying to read the inbox i'm getting error saying 'Unrecognized meta data strategy: null'. I placed the MBOX file in the folder'mstor:D:/home/mail/maildir'.

please check the below code

Session session1 = Session.getDefaultInstance(new Properties());            
String absolute_url = "mstor:D:/home/mail/maildir";
Store store = session1.getStore(new URLName(absolute_url));
store.connect();            
Folder inbox = store.getDefaultFolder().getFolder("inbox");

but when i am printing the store on the console its printing mstor://myusername@ , its not taking the url which i'm passing to it.

can somebody who made work around this please help me.

Thanks in advance...

No correct solution

OTHER TIPS

Try:

Properties props = new Properties();
props.setProperty("mstor.mbox.metadataStrategy", "xml");
Session session1 = Session.getDefaultInstance(props); 

For more info:

http://wiki.modularity.net.au/mstor/index.php?title=Metadata

Other properties are here:

 this.properties = new Properties();
        this.properties.setProperty("mail.store.protocol", "mstor");
        this.properties.setProperty("mstor.mbox.metadataStrategy", "none");
        this.properties.setProperty("mstor.mbox.cacheBuffers", "disabled");
        this.properties.setProperty("mstor.mbox.bufferStrategy", "mapped");
        this.properties.setProperty("mstor.metadata", "disabled");
        this.properties.setProperty("mstor.mozillaCompatibility", "enbled");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top