MailKit icon indicating copy to clipboard operation
MailKit copied to clipboard

Error in ImapFolder.GetSubfolders();

Open yuribb opened this issue 11 years ago • 3 comments

Hi there. I Created folder in my GMail account. For Example "TEST1" and then i created subfolders for this folder. For example "123\123" and "123/123". After that i tried to get subfolders from TEST1. "123\123" getting successfully as "TEST1/123\123, but "123/123" getting as "Getting as "TEST1/123" with "NoSelect" attribute and "TEST1/123/123" not retrieving. Protocol log looks like:

C: C00000009 LIST "" "TEST1/%"
S: * LIST (\HasChildren \Noselect) "/" "TEST1/123"
S: * LIST (\HasNoChildren) "/" "TEST1/123\\123"
S: C00000009 OK Success

And I can't get access to subfolder. Please advise if such folder names will be supported?

yuribb avatar Jul 01 '15 16:07 yuribb

MailKit should not have allowed you to create the "123/123" folder (it should have thrown an exception).

Basically, IMAP does not allow you to create folder names that have the path separator in them.

jstedfast avatar Jul 01 '15 17:07 jstedfast

It looks like MailKit already throws an exception.

What you are getting back from MailKit is the correct response. When you created the "123/123" folder under "TEST1", the combined path was: TEST1/123/123 - as I'm sure you can imagine, that creates the following folder tree structure:

TEST1
    123
        123

jstedfast avatar Jul 01 '15 17:07 jstedfast

Thank you. It works successfully. I get subfolders from folder "TEST/123". This subfolder has flag "NoSelect" and contain subfolder "123". This subfolder works like folder "123/123" in mailbox.

yuribb avatar Jul 02 '15 09:07 yuribb