谁能告诉我如何使用 mstor 在 Windows 上阅读 mbox 邮件消息
提前致谢...
//Remember to add the properties in above code.
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")
访问 mstor 邮箱的示例 url 可能是:
Microsoft Windows 机器上的 mstor:c:/mail
从本地存储读取消息:
Session session = Session.getDefaultInstance(new Properties());
Store store = session.getStore(new URLName("mstor:c:/mailbox/MyStore"));
store.connect();
// read messages from Inbox..
Folder inbox = store.getDefaultFolder().getFolder("Inbox");
inbox.open(Folder.READ_ONLY);
Message[] messages = inbox.getMessages();