Link to home
Start Free TrialLog in
Avatar of Genus1
Genus1Flag for Canada

asked on

JavaMail API: Problems Getting Folder Names

I am writing an application that can communicate with IMAP Servers and will allow the user to
access multiple folders on the server and access and manipulate the different messages that are in these folders.
 I am testing my application using my personal gmail account and am having difficulty getting the names of the folders in the account.  I know that there are 8 different folders in the account
but when I run the code below I get no folder names listed and the number of folders is stated as 1.  




Folder[] folders= store.getPersonalNamespaces();
for(int i=0; i<folders.length; i++)
          System.out.println("Folder #" + i + " is: " + folders[i].getName());
          System.out.println("The folder size is: " + folders.length);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial