14 October 2012

How GMail stores your mail

When folks come to GMail for the first time, they instinctively expect it it to work in exactly the same way as the other email services and email clients they have grown used to.

But when Google created GMail back in 2004, they had an opportunity to re-define email and how it worked from the ground up. So - being Google! - they did.

The result is a pretty sleek and efficient mail management system, with no duplicates, no folders, no separate mail streams - just a single mailbox managed with - being Google! - Search. They also went for threaded conversations as the default, and abandoned the time-honoured spreadsheet-like system of sorting mail by column headings, using Search instead to find mail by sender, by subject or by keyword using a capable and combinable range of search terms.

But whilst this is more efficient and - almost - foolproof in operation, it causes confusion among new users because it isn't the model most of us are familiar with. Here's how Google does it:

Labels not folders

The chief source of confusion is the message storage model.  Google's single mailbox is hard for many to grasp, as they are so used to splitting up their mail into separate folders according to their subject, making copies where necessary, and then freely deleting copies from one folder without disturbing the contents of other folders.
GMail, on the other hand, doesn't put messages in subject folders - it puts subject labels on messages. And that's a whole new ballgame!

The system adds labels like Inbox, Sent, Important - users add their own labels like Work, Vacation, Football, Family, etc. Then to see all messages which have any label, you click the label name in the GMail sidebar. GMail does a fast search in your mailbox, and pulls out all matching mail as a set of search results. And as each message can have many labels, a single message may appear in several sets of label search results. This leads to the assumption that there are duplicate messages in the account - which many people mistakenly delete - but of course there are not.
There is just one single message stored in the mailbox, but viewable by selecting any of its labels. As you can see from the illustration above, when you click on a label, you are only viewing a set of search results - you are not viewing mail which is permanently stored as separate copies in separate locations within the account. Delete a message or conversation from any set of label search results, and you are deleting the only copy from the main mailbox.

Things which go wrong

A particular source of confusion is Sent Mail, particularly when used in conjunction with the default conversation view. Some people like to keep a "clean" Sent folder by moving all the mail they send to another folder and then deleting the copy in Sent. In a traditional client that uses the single-message model, and generates copies to put in folders, your own Sent messages can be deleted without making an impact on anything else. In GMail, when you delete a message you have sent, not only are you deleting the only copy of the message you sent, but the only copy of the entire threaded conversation, including the message you replied to and any other messages within that conversation. The only copy will go straight to Trash.
Sent mail is therefore best considered as just that - a permanent set of search results for mail you have sent. Sent messages can be labelled and viewed using other relevant label searches, but the Sent label can't be removed - after all, a message you sent will always be a message you sent!  

Other people like to reply to a message, put it in a folder, and then delete the original they replied to from their Inbox. In GMail, this will have the identical result to deleting a Sent message. The only copy of the whole conversation will go straight to Trash.
In GMail, to remove a message from the Inbox, you remove the Inbox label - just select or open the message and click the Archive button to do that. Or you can do it manually by opening the message and clicking the "x" next to the Inbox label in the message heading. 

Still others might label a message with both Work and a specific Project label. In a client that would mean two copies - one in each folder. In GMail it means one message with two labels, viewable when you click on either of the labels. When the project is complete, if a client user deletes the copy in the Project folder, the copy in Work remains. In GMail, deleting the message from the Project label search results deletes it from the mailbox, and sends it to Trash, therefore deleting it from the Work label results as well.
In GMail, to remove a message from a set of search results, select the message and remove the appropriate label using the Labels button - or you can do it manually by opening the message and clicking the "x" next to the label name in the message heading.

Using Labels

Using Labels is fast and easy.

  • You use the Labels button to assign a label to a selected message or conversation - or you can drag the label from your sidebar into the message.  
  • To label a message and move it out of the Inbox in one step, use the Move button - or you can drag your message to the label in the sidebar. 
  • To remove a label from a message or conversation, select or open it and use the labels button to uncheck the label you no longer want, or do it manually by opening the message and clicking the "x" next to the label name. 
  • Labels can be given colours to distinguish them visually from each other - hover over the label name in the sidebar, and you'll see a little options sub-menu appear on the right, where you can add colours, and choose whether to show the label in your message lists or not, and whether to keep them permanently visible in the sidebar.
  • Labels you don't use often can be "hidden" from the labels list - then when you want to use them, click More... at the bottom of the list to find them
  • You can also adjust the display of your labels to make the most of your sidebar real estate by "nesting" them - so a number of related topics can be grouped under a parent label, and collapsed and expanded at will.
  • If you no longer need one of your user-created labels, you can just delete the label itself - messages that had that label will not be deleted, but will remain in your mailbox, viewable in All Mail, or in search results for any other label you might have given it. 
  • Labels are organised with the System labels first, in a set order, followed by your own list in alphabetical order. If you have some of your labels hidden, when you click More... you will see the hidden labels in a similar stacking order. 

Once you know how the system works, and adapt old habits to the new model, GMail is fast and efficient. The database of stored mail is kept to a minimum, with no duplicates and no surplus copies, so your 10Gb of free storage goes a long way. Mail is quick and easy to find, either by using label searches or the main search box to find other characteristics like senders, date ranges or keywords. There are a multitude of other tools to use - some built in and some available as add-ons called "Labs" - and several pages of settings where you can, within limits, customise how GMail works for you.

Some love it. Some hate it. But all in all, GMail's exactly what Google said it was back in 2004 - different!