BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 03-08-2006, 02:11 PM   #1
aburke
New Member
 
Join Date: Mar 2006
Model: 7290
Posts: 1
Default Finding Sub Folders

Please Login to Remove!

Hi, I can't see the subfolders or the messages I know exist under them. Here is the output when I run my code...

Mail Box: Desktop://AWB_1 0
Mail Box: Desktop://Filed Messages 0
Mail Box: Desktop://Saved Messages 0
Mail Box: Desktop://Unfiled Messages 0
Mail Box: Desktop://AWB_1/draft 0
Mail Box: no service book://Inbox 0
Mail Box: no service book://Outbox 0
Mail Box: no service book://Saved Messages 0
Mail Box: no service book://Unfiled Messages 0
Mail Box: no service book://Filed Messages 0
Mail Box: no service book://draft 0

There should be a folder with a message with this subject as seen below (according to my co-workers results) Neither he or I can see what the diff between his code and mine is....

Desktop://AWB_1/Mailbox//TC 1.41 Mark read and delete

Why can't I see the sub folders? I need to find this message (TC 1.41 Mark read and delete), mark it read and delete it. That's it, that's all. I don't even care where the message is, I just need to find it. Here is a snip of my code....
Code:
    /**
     * Run the test case.
     */
    public void run() {
        
        super.run();
        try
        {
          //  Store store = Session.waitForDefaultSession().getStore();
            Folder[] folders = Session.waitForDefaultSession().getStore().list();
            
            for (int i = 0; i < folders.length; i++)
            {
                Message[] msgs = folders[i].getMessages();
                String str_mailbox = folders[i].getFullName().toString();
                System.out.println("Mail Box: " + str_mailbox + " " + msgs.length);

                for (int j = 0; j < msgs.length; j++)
                {
                
                 System.out.println("Messages: " + msgs[j].getSubject());
                 
                    if ( msgs[j].getSubject().startsWith("TC 1.41"))
                    {
                        System.out.println("TC Message: " + msgs[j].getSubject());
                    
                        msgs[j].setFlag(Message.Flag.OPENED, true);
                        folders[0].deleteMessage(msgs[j]);
                        String actionMessage =
                            "ACTION:DELETE:MFH MSGID:" + this.getUniqueId() + 
                            " SRCACCOUNT:" + msgs[j].getFrom().getAddr() + 
                            " DSTACCOUNT:" + msgs[j].getRecipients(Message.RecipientType.TO)[0].getAddr() +
                            " Delete message";
                        this.logMessage(actionMessage);
                    } 
                }

            }
        }    
        catch ( NoSuchServiceException nsse )
        {
        }
        catch ( FolderNotFoundException fnfe )
        {
        }
        catch ( MessagingException me )
        {
        this.failed("Error deleting message", me);
        return;
        }
    
     }
}
Can anyone help me??

Last edited by aburke; 03-08-2006 at 04:05 PM..
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


1000W Stainless Steel Welding Bead Processor,Brush Type Weld Cleaning Machine picture

1000W Stainless Steel Welding Bead Processor,Brush Type Weld Cleaning Machine

$193.80



Omron S8VK-G48048 Power Supply Untested READ #1 picture

Omron S8VK-G48048 Power Supply Untested READ #1

$29.96



NORCONTROL NN-791.12 I/O PROCESSOR CARD HER 100261 I picture

NORCONTROL NN-791.12 I/O PROCESSOR CARD HER 100261 I

$439.00



TUTHILL PUMP 1LA PUMP *PARTS ONLY* picture

TUTHILL PUMP 1LA PUMP *PARTS ONLY*

$299.00



4100U Simplex CPU Motherboard Assy 566-227 637-158 **UNTESTED** picture

4100U Simplex CPU Motherboard Assy 566-227 637-158 **UNTESTED**

$179.96



SIEMENS 6SN1121-0BA11-0AA1 Spindle Control Module New in Box 6SN1121-0BA11-0AA1 picture

SIEMENS 6SN1121-0BA11-0AA1 Spindle Control Module New in Box 6SN1121-0BA11-0AA1

$1498.20







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.