Question

I am using mstor to read the mbox email messages, but i am not able to connect to the store using the urlName name which i m passing, by default its connecting to other location on my macbine.Do i need to create the store using mstor JCR before proceed to connect to the store?

    Session session = Session.getDefaultInstance(new Properties());
    Store  store = session.getStore(new URLName("mstor:C:/mailbox/MyStore/Inbox"));
    store.connect();
    Folder inbox = store.getDefaultFolder().getFolder("inbox");
    inbox.open(Folder.READ_ONLY);               
    Message m = inbox.getMessage(0);

Any suggetions are helpful

Thanks in advance..

No correct solution

OTHER TIPS

//Set the Properties as shown below:



Properties 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.cache.disabled", "true");
            this.properties.setProperty("mstor.mbox.bufferStrategy", "mapped");
            this.properties.setProperty("mstor.metadata", "disabled");


//Also mstor count for messages start from 1 and not 0. so change it to 1.


Store  store = session.getStore(new URLName("mstor:C:/mailbox/MyStore/Inbox"));

    store.connect();

    Folder inbox = store.getDefaultFolder().getFolder("inbox");
    inbox.open(Folder.READ_ONLY);               
    Message m = inbox.getMessage(1);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top