Provide Delete and Archive buttons for Gmail's peculiar IMAP.
In Gmail's IMAP, the Delete and Archive actions are not like those on other IMAP servers. Here is an explanation -- this assumes the Gmail user's IMAP settings are in default mode (under Settings>Forwarding and POP/IMAP>IMAP access).
First consider what the Gmail UI does. In its left-side list, you see All Mail. As the name suggests, all messages appear there. A Gmail message can have multiple labels. When a message is delivered, it gets the Inbox label. So it appears in Inbox and All Mail. When you click the Delete button on a message, Gmail removes the Inbox label and applies the Trash label. Now it appears under Trash (and, as an exception, not in All Mail). About the Archive button: when you click the Archive button on a message, all labels are removed, so it only appears in All Mail.
Now look at IMAP with Gmail. Normally to delete an Inbox message, you set the \Deleted flag on it. This causes Gmail to remove the Inbox label. It still appears in All Mail. (This is like clicking the Archive button in Gmail UI.) Compare this to other IMAP servers, where the \Deleted flag eliminates the message completely (after the Expunge operation). If you want the message in the Trash via IMAP, then you have to use IMAP Copy to the [Gmail]/Trash folder; this causes Gmail to apply the Trash label to the message. Then set \Deleted on the message in the Inbox to remove the Inbox label. Now the message only appears in Trash.
So I am requesting an Archive button for Gmail accounts that will set \Deleted on the message so it will only appear in All Mail -- no other IMAP action or separate "Archive" folder is needed.
And I am requesting a Delete button for Gmail accounts that will copy the message to [Gmail]/Trash, and set \Deleted on the Inbox message (in that order).
thanks