Summary
We call MCOIMAPFetchFoldersOperation to fetch all folders. Outlook supports folder flags to identify. Sometimes trash folder flag returns wrong value.
Platform(s)
iOS
Happens on Mail Server
Outlook
Piece of code
/// Servers which have flag support:
switch imapFolder.flags {
....
case .trash:
folder.id = FolderId.trash.raw
....
default:
/// Folder Flag not supported or custom folder
We can identify Deleted(trash) folder with checking imapFolder.flags == .trash but sometimes Deleted folder returns
▿ MCOIMAPFolderFlag
rawValue : 257
And this enum is not trash value. The trash rawValue is 256.
It returns randomly correct value.
Summary We call MCOIMAPFetchFoldersOperation to fetch all folders. Outlook supports folder flags to identify. Sometimes trash folder flag returns wrong value.
Platform(s)
Happens on Mail Server
Piece of code
We can identify Deleted(trash) folder with checking
imapFolder.flags == .trash
but sometimes Deleted folder returns ▿ MCOIMAPFolderFlag