Accessing to mailbox with ZMailbox.java
I need a help here to accessing to my mailbox via java.
Options opt = new ZMailbox.Options();
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("email@example.com", null, null, "t");
List lst = new ArrayList();
out.setSubject("testing outgoing mail");
mb.sendMessage(out, "", false);
It works, firstname.lastname@example.org 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?