posted 18 years ago
Hi there!
Something realy strange happens when i try to connect and retrieve the messages in a mailbox.I connect to the mbox and then ask the number of messages in that folder with a code like that;
store.connect("localhost","someuser","somepassword");
Folder folderdef=store.getDefaultFolder();
Folder folder=folderdef.getFolder("INBOX");
folder.open(Folder.READ_ONLY);
Message [] mes=folder.getMessages();
System.out.println(mes.length);
folder.close(true);
store.close();
The response is 0 messages
When I connect to that mailbox with another mailclient i can see that there are many messages in that folder
All this in a try/catch section. No exceptions thrown
The mail server is local
Can anybody help me with my problem?
Regards,