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:
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:
- The message is actually removed from
INBOX / archived.
- The command fails with a clear error if archive is not supported for that account/mailbox layout.
- 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.
Summary
mail-app-cli messages archivecan returnMessage archivedeven when the message still remains in the source mailbox. This makes the command look successful, but a follow-upmessages showormessages inboxstill reports the message as being inINBOX.What I ran
The command returned:
But after that, checking the same message still showed:
{ "Mailbox": "INBOX", "Account": "<account>" }And the message continued to appear in:
This happened on Gmail-style accounts where the mailbox list includes
All Mailbut not a distinctArchivemailbox.Example mailbox list shape:
[ { "Name": "All Mail", "Account": "<account>" }, { "Name": "INBOX", "Account": "<account>" } ]Expected behavior
One of these should happen:
INBOX/ archived.Additional note
I also tried moving a message from
INBOXtoAll Mailas a possible workaround:That failed with: