Skip to content

messages archive reports success but some messages remain in INBOX #2

Description

@alewkinr

Summary

mail-app-cli messages archive can return Message archived even when the message still remains in the source mailbox. This makes the command look successful, but a follow-up messages show or messages inbox still reports the message as being in INBOX.

What I ran

mail-app-cli messages archive <message-id> -a "<account>" -m "INBOX"

The command returned:

Message archived

But after that, checking the same message still showed:

{
  "Mailbox": "INBOX",
  "Account": "<account>"
}

And the message continued to appear in:

mail-app-cli messages inbox --limit 100

This happened on Gmail-style accounts where the mailbox list includes All Mail but not a distinct Archive mailbox.

Example mailbox list shape:

[
  { "Name": "All Mail", "Account": "<account>" },
  { "Name": "INBOX", "Account": "<account>" }
]

Expected behavior

One of these should happen:

  1. The message is actually removed from INBOX / archived.
  2. The command fails with a clear error if archive is not supported for that account/mailbox layout.
  3. The CLI maps archive behavior correctly for Gmail-style accounts, likely by removing the inbox label or moving to the right archive-equivalent mailbox.

Additional note

I also tried moving a message from INBOX to All Mail as a possible workaround:

mail-app-cli messages move <message-id> "All Mail" -a "<account>" -m "INBOX"

That failed with:

failed to move message: Error: Error: Can't get object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions