Google’s free Gmail offers fantastic convenience and many useful features, but it’s never played well with Apple’s Mail.
The crux of the conflict when using Mail as a client for Gmail is labels, Google’s alternative to traditional e-mail folders. Instead of filing messages into single folders like Mail and most other clients, Gmail essentially lets you tag e-mail messages with multiple words like you can with photos on Flickr or bookmarks at Delicious. Because you can apply as many labels as you want to a message, and Google creates an All Mail folder to collect every message in your account, working with Gmail in Mail can get clunky, and fast.
For instance, if you apply three labels to an inbox message in Gmail, five copies of that message will appear in Mail when you search for it: three for the aforementioned labels, one from the inbox, and one from the All Mail folder.
Over time, though, both Google and third parties have attempted to bridge the gap between Gmail and Mail, with tactics that include adding more control over IMAP features and replicating some of Gmail’s productivity perks in Mail. Depending on your needs, Gmail and Mail can actually work quite well together, and we can show you how.
This article assumes that you already have a Gmail account, have properly set it up in Mail, and have some reasonable familiarity with both.
Step 1: Turn on advanced Gmail features
For a while now, Gmail has offered some often overlooked options that give you more control over how external clients like Mail interact with your Gmail labels.
To start using these options, go to the Labs tab of your Gmail settings and enable the Advanced IMAP Controls feature. Be sure to click Save Changes, and Gmail will refresh itself, bringing you back to your inbox.
Step 2: Customize your labels
Go back into your Gmail settings and then to the Labels tab. You now have control over whether most of Gmail’s labels appear in Mail (again, as folders). More than likely, you want to disable the All Mail label—it is responsible for most of the message duplication in traditional e-mail clients.
Also, feel free to hide any other labels that you don’t need while offline, or labels for any of your Gmail rules that might create unnecessary duplicates in Mail. Note that you’ll have to log into Gmail in a browser if you need to look up messages with any of the labels that you excluded from Mail, including archived messages. If you opt to follow step three to automatically archive Gmail messages that you trash in Mail, you might also want to hide Gmail’s Trash label from your IMAP clients.
Step 3: Enable IMAP archiving
When you delete messages from Mail (and most typical e-mail clients), the program moves them to the Trash folder for disposal. This behavior made sense in the past when disk space was a precious commodity and e-mail programs and services could get bogged down if they had to organize too many messages. But thanks to zippy Macs, powerful servers, and bountiful disk space these days (even online), Gmail takes a different approach by defaulting to an “archive” behavior. This moves messages out of the Inbox, but keeps them around in the searchable All Mail folder—instead of just getting rid of them forever—for that rainy day.
Since we’re looking to turn Mail into a good Gmail client, you can make your keyboard’s Delete button tell Gmail to archive the message. Just go to Gmail’s Forwarding and POP/IMAP tab in Settings and locate the Auto-Expunge setting, in the IMAP Access section. Switch it to Do Not Automatically Expunge Messages. Then, set When A Message Is Expunged From The Last Visible IMAP Folder to Archive The Message. Save your changes at the bottom of the page.
Now, whenever you delete a message from Mail (including all of the labels/folders it is duplicated in), it’ll be archived in your spacious Gmail account and searchable online if you end up needing it down the road.
Step 4: Fine-tune your Mail settings
Now that Gmail is all set, it’s time to tweak your Mail settings to be on their best behavior. Go to Mail -> Preferences, and select your Gmail account. Click on the Mailbox Behaviors tab and:
- Enable Store Draft Messages On The Server if you want your drafts to be accessible in Gmail on the Web.
- Make sure Store Sent Messages On The Server is checked, and that the Delete Sent Messages When popup menu is set to Never.
- Enable Move Deleted Messages To The Trash Mailbox, but disable Store Deleted Messages On The Server. This is the other half of the feature we set up in step 3. Mail will create its own Trash folder that is stored locally on your Mac, but in Gmail on the Web, messages will be archived and searchable. Close the settings window and click Save to accept your changes.
- Find your Gmail folders in Mail’s sidebar, unfurl the folder called [Gmail], and then select the Drafts subfolder. Then select Mailbox -> Use This Mailbox For -> Drafts.
- Select the [Gmail] -> Sent Mail subfolder and choose Mailbox -> Use This Mailbox For -> Sent
- Finally, select the [Gmail] -> Spam subfolder and select Mailbox -> Use This Mailbox For -> Junk. These last three actions ensure that Mail and Gmail are on the same page when it comes to which folders to use for storing these types of messages. If you use multiple Macs, be sure to go through these motions in Mail on each one.
Your Gmail account and Mail should now be humming along together about as in tune as they can, given their different approaches to handling e-mail.
One of Gmail’s advantages is its focus on keyboard productivity. You can quickly label, archive, and delete messages, or even move between labels, all without touching a mouse. If you want some of that organizational power in Mail, give Indev Software’s $25 Mail Act-On plug-in ( ) a try. Mail Act-On lets you customize keyboard shortcuts for doing just about anything you want in Mail. Select one or more messages and add colored labels to help them stand out for revisiting later, move messages to a folder, even run an AppleScript on a group of messages—all with a single keyboard stroke.
Mail Act-On also integrates with one of Indev Software’s other plug-ins, the $30 MailTags ( ), for applying tags and project management tools to your e-mail. Note that there’s one important limitation with Gmail and Mail Act-On if you use multiple Macs. Unlike most other IMAP e-mail services, Gmail will not sync these tags back up to its servers, so they are not accessible to any of your other Macs. If you apply a Mail Act-On tag to a message on one Mac and search for that tag on a second Mac, you won’t get a match.
Mail and Gmail might not be a perfect match, but with a little configuration, they can get along. If you prefer accessing all of your mail offline, harnessing the advantages of Mail’s integration with the rest of Mac OS X, or if you simply have multiple accounts and services to keep an eye on, you can incorporate Gmail into the rest of your business and pleasure with a minimum of hassle.
Updated at 1:13 p.m. PT to add instructions for Gmail’s Trash label.