List command

Feb 29, 2008 at 5:25 PM
Hi all,

Could somebody tell me how could I retrieve all the
folder's name from an IMAP Server using Koolwired.Imap

Thank you.
Mar 19, 2008 at 5:47 PM
off the top of my head i think this has not been implemented yet.
Mar 3, 2009 at 11:58 AM
Has anyone implemented this functionality yet?
Mar 9, 2009 at 7:27 PM
If anyone has they have not contributed it back to the project.
Apr 17, 2009 at 2:41 AM
I have completed some of this work and its in subversion on sourceforge. I am still working on parsing the folders to build the folder tree. Once I get it done ill put it into a build just finding time is hard sometimes.
Apr 22, 2009 at 7:59 AM
Great new release!
But I just found a bug in ImapFolderNodeList.cs, function GetIndex(string folder)
The if-statement will not match the name of my folders, since my folders starts with a uppercase letter.

this[i].Value.ToLower() gives "trash" and
folder is "Trash"

Because of this the folder tree is not correct.

int GetIndexOf(string folder)
   //changed from
   //if (this[i].Value.ToLower() == folder)
   //if (this[i].Value == folder)

   for (int i = 0; i < this.Count; i++)
      if (this[i].Value == folder)
         return i;
   throw new IndexOutOfRangeException("Folder " + folder + " does not exist in the collection.");
Apr 22, 2009 at 12:27 PM
doh not sure how i missed that thanks
May 5, 2009 at 6:35 AM
Edited May 5, 2009 at 6:35 AM
Hello! Please tell me how to get message attachment?
May 5, 2009 at 6:47 AM
Sorry =) Reply myself:

ImapConnect connection = new ImapConnect(server");

            ImapCommand command = new ImapCommand(connection);
            ImapAuthenticate authenticate = new ImapAuthenticate(connection, user, pwd);
            ImapMailbox mailbox = command.Select("INBOX");
            int TotalRecords = mailbox.Exist;
            mailbox = command.Fetch(mailbox);

            ImapMailboxMessage msg = mailbox.Messages[1];
            msg = command.FetchBodyStructure(msg);
            ImapMessageBodyPartList parts = msg.BodyParts;

... =)