0

谁能告诉我如何使用 mstor 在 Windows 上阅读 mbox 邮件消息

提前致谢...

4

2 回答 2

1
//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")
于 2012-07-15T00:41:03.607 回答
1

访问 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();
于 2011-10-05T09:20:40.927 回答