Hi gurus,

I need a help here to accessing to my mailbox via java.

Options opt = new ZMailbox.Options();
opt.setAccount("myname@myemail.com");
opt.setPassword("password");
opt.setAccountBy(AccountBy.name);
opt.setUri("https://imap.myurl.com/service/soap/");
ZMailbox mb = ZMailbox.getMailbox(opt);

and then i try to send a mail with just created ZMailbox object.

ZOutgoingMessage out = new ZOutgoingMessage();
ZEmailAddress address = new ZEmailAddress("user@xxx.com", null, null, "t");
List lst = new ArrayList();
lst.add(address);
out.setAddresses(lst);
out.setSubject("testing outgoing mail");
mb.sendMessage(out, "", false);

It works, user@xxx.com received the mail from my account.
and then i try to access to my Inbox folder.

ZFolder folder = mb.getFolderById("2");

If I am not mistaken, getFolderById("2") is same with getFolderByPath("Inbox")

I actually tried both, but I always get NULL returned for the folder.

May I know what would be the possible mistake that I made here?

Thank you!