10-10-2008 05:03 PM
We are on a coporate BES account and I setup my Outlook with subfolders and it shows on my device as follows:
Mailbox - Me
works great but now i try to write an application that has the need to pull up incoming mail but can only read the [Inbox] as everything was automatically moved to their appropriate folders.
I saw some examples and tried it but can't seem to list the incoming mail in sub folders.
Do I have to know each folder's name to view it? or is there a method for just reading all folders with incoming mail.
Solved! Go to Solution.
10-10-2008 07:16 PM - edited 10-10-2008 07:55 PM
yes i have but since this is my first attempt to work with mails I was not sure about the folder listener part. So from what it says I need to attach a listener to each folder. but does my app have to be running to actually receive these notices. or my i only to be concerned about the "Search recursively for INBOX folders" part of the article?
I think i got. tried some things and getting lower folder information now
10-10-2008 10:01 PM
need help with deciphering this piece of code:
public void recurse(Folder f)
if ( f.getType() == Folder.INBOX )
listFoldersItems(f); // test 1
Folder farray = f.list();
for (int fcnt = farray.length - 1; fcnt >= 0; --fcnt)
listFoldersItems(farray[fcnt]); // test 2
When running this code with [test 2] enabled I get every email that was received on my device. but if [test 1] is enabled I get 1/4 or less for the last 2 months.
The if statements checks the folder is of type INBOX. Does this mean that because I orginally setup sub folders that these sub folders even tho they received the new emails are not considered INBOX?
And if I need to access all incoming mail then i should be fine with loading my listfield using option test 2?
10-11-2008 01:54 PM - edited 10-11-2008 02:07 PM
is there a way to determine which level a folder is? for example I'm trying to use a treefield to recreate the folder tree in the mail applicaton and I need to know which folder level the "My Coworkers" folder is.
Mailbox - Me
When i try to get Type its the same as:
--------My Coworkers = OTHERS
--------------Coworker A = OTHERS
--------------Coworker B = OTHERS
Also is there a unique ID for each folder? I'm getting multiple Inbox and and other folders and would like to retrieve the message from them.