Open infpmandin opened 2 months ago
Funny, there is already a TODO in the code for this very feature:
//Todo: Get mail box attributes here
{CC2: Could put mailbox attributes in AMBList's Objects property?}
That comment has existed since Indy 9. It was just never implemented yet.
Obviously, using the caller's TStrings.Objects
property for output would not be a good idea. Will probably have to define a new TCollection
class for this purpose, similar to TIdImapMessageParts
used in various Retreive
methods.
Whatever solution is created should also be applied to ListInferiorMailBoxes()
and ListSubscribedMailBoxes()
as well.
TIdIMAP4 ListMailboxes only return the list of mailboxes in the account.
The IMAP4 LIST command used parses the result and only return the mailbox names. Could be useful to have an extended version that also gives back the flags (i.e. sent, draft, trash, etc) set to each mailbox.
Currently the only workaround would be to SelectMailbox() each one of these to get the flags.