How to get the list of available folders in a mail account using JavaMail

I am using JavaMail API to connect to my personal account. I have list of folders (labels) in my Gmail account which I created + the default folders like Inbox, Drafts etc. How can I list all the available folders (the default and the user created)?

I can access the particular folder using this API: Folder inbox = store.getFolder("Inbox");. Is there any other API to get the list of folders available in a mail account?

39
задан bluish 6 June 2013 в 08:12
поделиться