CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Java and JSP (http://www.codingforums.com/forumdisplay.php?f=54)
-   -   Javamail: How to Search Email in Multiple Folders at Once? (http://www.codingforums.com/showthread.php?t=209599)

savannah_becket 11-18-2010 07:55 PM

Javamail: How to Search Email in Multiple Folders at Once?
 
Hi,
I am using Javamail api. I know how to search email in one folder, but how to search email in multiple folders at once? Like issue one search command as a global search to the email account, it is for efficient purpose. The only way I can think of is to go to each folder and issue a search on each folder. But if there are 10 folders, I will have to run search function 10 times. I tried to just use the folder I got from getDefaultFolder ( ) to do the search and think that it maybe the root of all folders, but it doesn't work. I have to getFolder (each_folder) and search 10 times. Does anyone know how? I want this
Thanks.


All times are GMT +1. The time now is 03:03 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.