+1 vote

I have used the GetFoldersTree function with IMAP but its not returning any folder which have a "/" character in them. Is this a know issue with IMAP component.

by (350 points)
retagged by

1 Answer

0 votes

If "/" character is hierarchy delimiter (which is very common), this is expected.

All sub folders can be found in FolderInfo.SubFolders collection.


From the logs it's clear that the server is not sending this name at all. In such case there is nothing you can do. This is server-side bug You should contact server administrator/support and report this bug.

Sorry I don't have better news for you.

by (298k points)
edited by
I have all of the other sub folders fine but if the folder name has a "/" which outlook allows me to put in then the folder with the "/" in it isn't included within the SubFolders collection.
Such folder of course shouldn't be in SubFolders collection. "/" character must be encoded (utf7). Please turn on logging: https://www.limilabs.com/blog/logging-in-mail-dll we'll see if the server is sending correct data. As usual please make sure, that you are using the latest Mail.dll version.
Thanks for the logs. What kind of IMAP server is that?
Its connnecting to an exchange server.