开发者

How to set url to read inbox in mstor on windows machine

开发者 https://www.devze.com 2023-04-11 00:46 出处:网络
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 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 sess开发者_运维技巧ion1 = 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...


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");
0

精彩评论

暂无评论...
验证码 换一张
取 消