Mobile // Mobile Devices
Commentary
10/31/2007
01:59 PM
Mitch Wagner
Mitch Wagner
Commentary
Connect Directly
RSS
E-Mail
50%
50%

How To Get Gmail's IMAP, Leopard, And The iPhone Working Together

When I heard last week that Gmail is getting IMAP support, I was excited. My life was going to get a little easier. And how hard could it be to set up? Change a couple of settings in Apple Mail and I'd be good to go, right?

When I heard last week that Gmail is getting IMAP support, I was excited. My life was going to get a little easier. And how hard could it be to set up? Change a couple of settings in Apple Mail and I'd be good to go, right?

It hasn't quite worked out that way.

IMAP is a standard for automatically synchronizing mail stores between one or more client devices and a server. It's great for people like me who access e-mail from more than one client. When I travel I sometimes access mail using Gmail's Web interface and sometimes on my iPhone. I have to read each message multiple times: on the iPhone, on Webmail, and then again on my desktop when I return to my home office.

IMAP is designed to automate all that. Mark a message as read on a single device -- or flag it for further action, or move it to a folder -- and the changes automatically sync up on all your client devices, and on your Webmail interface, too. Neat.

Gmail has instructions for configuring your Gmail account for IMAP. They're pretty good, but there are a few things Google doesn't tell you. I've documented some of the problems I encountered, and how I solved them, in the hopes of making things easier for you readers. I wrote these tips for my setup -- Gmail, Apple Mail, and the iPhone -- but I expect they'll be useful with other e-mail clients as well.

First, you can't just change the POP settings on your existing Apple Mail account to IMAP. That would be too easy. You need to set up a new account in Apple Mail. It's pretty simple to do once you've figured it out, but it took me a few minutes of thinking and Googling to find out why my apparently correctly configured mail account wasn't working.

Once I figured out the problem, the solution was simple. I deleted my existing account in Apple Mail and created an account with IMAP. I deleted all the old messages, too, because I knew that all my mail was still on the server and it would be downloaded again when I next connected.

That worked out fine.

Second, there was the matter of rules for filtering messages. I had several rules -- some of them fairly complex -- for automatically sorting incoming mail into folders. Those rules stopped working entirely when I went over to IMAP.

Again: I had to think for a couple of minutes to figure out why that was happening: My rules were set up to operate on my client computer, after the messages were downloaded. They weren't IMAP compatible. So I deleted all the rules, and rebuilt them as Gmail filters, so the rules would work for all my mail clients.

Gmail and Apple Mail don't sync mail precisely, with zero inconsistencies, as the blog 5thirtyone describes. Apple Mail folders don't map precisely to Gmail labels. Gmail lets you attach multiple labels to an individual e-mail, while an e-mail can only live in one folder on Apple Mail. If an individual message has multiple labels on Gmail, Apple Mail will copy that message into multiple folders.

Also, Trashed, Sent, Drafts, and Junk mail messages are sorted inconsistently between Apple Mail and Gmail, according to 5thirtyone. I haven't looked into that problem yet, I'm still getting everything else working right and nailed down.

Next problem: Connecting the iPhone to Gmail using IMAP. That was fairly simple once I got Apple Mail configured, because iTunes has a setting that lets you overwrite your iPhone settings with your desktop settings.

Open iTunes, click on "Devices," select your iPhone, select the tab marked "Info," then scroll down to the "Advanced" section. You'll see a control labeled "Replace information on this iPhone." Click "Mail Accounts," then "Apply," and you should be all set. Sync your iPhone with your Mac. It's a one-time setting, don't worry about changing it back.

Then go into your iPhone settings and delete the old POP3 accounts.

This seems to work out fine, except for one problem: Messages marked as read on the iPhone, but already downloaded to Apple Mail, aren't showing up as read in Apple Mail. If I can't find a fix to that, I'll live with it -- realistically, I'm not going to be downloading many messages to the iPhone and Apple Mail simultaneously. Sure, if I'm out of the office a few hours, I'll leave Apple Mail running, but when I'm gone for longer than overnight, I shut off the iMac -- or at least shut down Apple Mail -- and it's those multiday trips that are killers for syncing up e-mail when you get home.

Are we done yet? No, there's still a couple of loose ends to sort out.

My changed Apple Mail configuration leaves me with a huge tangle of mailboxes to sort out. I have two MAPI-enabled Gmail accounts (and hope to have a third soon, when Google gets around to enabling MAPI on my third, and final, Gmail account). Each account has six default mailboxes -- All Mail, Drafts, Sent Mail, Spam, Starred, and Trash, plus whatever additional mailboxes I've created for it. Each of my Gmail accounts has its own spam folder, plus Apple Mail's own Junk folder. I'd like to consolidate that tangle of mailboxes into a single hierarchy.

That's where Smart Mailboxes comes in. Smart Mailboxes are saved e-mail searches. You set up the criteria, click a button, and the mailboxes are saved to their own folders under the label "Smart Mailboxes." I created several smart mailboxes so far, including one for spam, into which I consolidate all my spam and junk mail folders; one for all unread messages in the in-boxes of all accounts, and one for all messages I've flagged for further action.

None of this is particularly difficult, requiring massive intelligence to sort out. It's merely tedious. But hopefully the tedium will pay off, and my e-mail management will be a lot simpler.

Comment  | 
Print  | 
More Insights
Building A Mobile Business Mindset
Building A Mobile Business Mindset
Among 688 respondents, 46% have deployed mobile apps, with an additional 24% planning to in the next year. Soon all apps will look like mobile apps – and it's past time for those with no plans to get cracking.
Register for InformationWeek Newsletters
White Papers
Current Issue
InformationWeek Tech Digest - September 10, 2014
A high-scale relational database? NoSQL database? Hadoop? Event-processing technology? When it comes to big data, one size doesn't fit all. Here's how to decide.
Flash Poll
Video
Slideshows
Twitter Feed
InformationWeek Radio
Sponsored Live Streaming Video
Everything You've Been Told About Mobility Is Wrong
Attend this video symposium with Sean Wisdom, Global Director of Mobility Solutions, and learn about how you can harness powerful new products to mobilize your business potential.