+1 vote

I try to find all subscribed folders, by iterating through:

  List<FolderInfo> folders = await imap.GetFoldersAsync();
  foreach (FolderInfo folder in folders)
            {
                    List<FolderFlag> flags = folder.Flags;
                    for (int i = 0; i < flags.Count; i++)

Unfortunately no folder has the subscribed flag set. When turning logging on, the server does not seem to send this flag after sending LIST. But other email clients show the correct folder.

Is GetFoldersAsync the correct command?

by (8.8k points)

1 Answer

+1 vote
 
Best answer

You can simply use GetSubscribedFolders() / GetSubscribedFoldersAsync() methods.

by (297k points)
...