Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIdIMAP4: RFC 6154: Add a version of ListMailboxes that return also the mailbox' flags #538

Open
infpmandin opened this issue Jul 12, 2024 · 1 comment
Labels
Element: IMAP4 Issues related to TIdIMAP4 and TIdIMAP4Server Status: Review Needed Issue needs further review to decide next status Type: Enhancement Issue is proposing a new feature/enhancement

Comments

@infpmandin
Copy link

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.

@infpmandin infpmandin added Status: Reported Issue has been reported for review Type: Enhancement Issue is proposing a new feature/enhancement labels Jul 12, 2024
@rlebeau rlebeau added the Element: IMAP4 Issues related to TIdIMAP4 and TIdIMAP4Server label Jul 12, 2024
@rlebeau
Copy link
Member

rlebeau commented Jul 12, 2024

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.

@rlebeau rlebeau added Status: Review Needed Issue needs further review to decide next status and removed Status: Reported Issue has been reported for review labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Element: IMAP4 Issues related to TIdIMAP4 and TIdIMAP4Server Status: Review Needed Issue needs further review to decide next status Type: Enhancement Issue is proposing a new feature/enhancement
Projects
None yet
Development

No branches or pull requests

2 participants