May 27, 2013

Managing Sent Mail

As many already know, Gmail doesn't use folders to organize messages as many traditional e-mail clients do.  Instead it uses labels.  All your messages are stored in All Mail.  Everything else (Inbox, Starred, Drafts, user-labels, etc) are just "views" into a sub-set of the messages in All Mail.

Labels could be though of as colored sticky or post-it notes that you might apply to physical letters so you can later easily find all the red ones, or all the yellow ones.  For more detail on this see:

Sent Mail is a little different.  It could be thought of as a pre-defined filter that shows you all the messages you have sent rather than a simple label.  While it is possible to remove messages from Sent Mail using IMAP from an email client or mobile device, that is only a temporary change.  At any time Gmail may re-index your messages and cause all sent messages to once again show in Sent Mail.

So, in summary:
1.  Sent Mail is not a label.
2.  Using IMAP to move messages out of Sent Mail is not permanent.

The above behaviors can be a problem for people who like to manage their Sent Mail as if it was a normal label or folder.  They may wish to keep messages sent to other people in Sent Mail until they receive a reply or answer.  That is, the message being in Sent Mail acts an indicator of "action pending" and it's removal from Sent Mail signifies "action complete".

Fortunately, there's a way around the fact that Sent Mail doesn't behave like a normal label.  We can create a new sent label that will do exactly what we want.

The first step is to hide the system Sent Mail label.  Pretend it doesn't exist and never use it again.
Settings -> Labels and set Sent Mail to Hide.
Next we create a new label to hold all the e-mail that has been sent.
Settings -> Labels click Create New Label and name it "MySent' (or whatever you want).
Settings -> Labels and set "MySent" to Show
Settings -> Labels and un-check the "Show in IMAP" for "MySent"
Now we need to make sure all messages we send are labeled with this new label.
Settings -> Filters click Create New Filter
Enter "me" in the "From" field
On page 2, check "Apply the label" and select "MySent"
Click Create Filter
The new filter should look like this in Settings->Filters
Matches: from:me
Do this: Apply label "MySent"
Note that "from:me" works correctly even if you have multiple from addresses configured in your account.

We now have our own label which will hold all the messages sent, and can be managed in any way we want.

Of course the normal rules about labels still apply.  Since there is only one copy of each message (potentially with multiple labels applied), if you delete the message from any label it will be removed from all of them and placed in Trash.  This means you'll probably want to remove the "MySent" label from messages rather than deleting them.