سؤال

Can anybody tell me how to use mstor to read mbox mail messages on windows

Thanks in advance...

لا يوجد حل صحيح

نصائح أخرى

An example url for accessing an mstor mailbox might be:

mstor:c:/mail on a Microsoft Windows machine

Reading messages from a local store:

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();
//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")
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top