I think a large portion of the American---and possibly worldwide---population is bitterly lamenting the lack of Gmail's push capabilities with the iPhone. Gmail was quirky with the BlackBerry too, but in different ways. With the BlackBerry, if I set Gmail up with POP instead of IMAP, the Berry got messages before they showed up on my computer. IMAP...took a while. The iPhone is the same with IMAP. I have the iPhone set to poll hourly for Gmail, but there are other forces at work, because my Gmail arrives on the iPhone anywhere from before it lands in my inbox to 20 minutes later. Nevertheless, the freaking iPhone is supposed to be all about freaking push, so I felt geekishly compelled to ferret out a way to have "Gmail push" on the darn thing. Solutions abound on forums all over the Web, but most end up with "use a forwarding service" (most of which you have to pay for). No thanks. Here is how to do it. It assumes you are using Mobile Me and Mail.app in addition to Gmail.
- Go to Mail.app's preferences pane and select your Mobile Me account. Change the e-mail address to your gmail address, and change the SMTP server to the gmail SMTP server. Through mystical means (see next step), this allows you to, in effect, use the Mobile Me account on your iPhone as though it's actually your Gmail account ("Reply" will let you reply from Gmail and not Mobile Me).
- Create the mystical means: open your Mobile Me preferences pane and make sure your two Mail options are selected. Check the box for mail syncing in iTunes as well, just for good measure. I'm actually not sure which one does the job, and my dedication for testing ends right here (if you know, leave a comment).
- Log into Gmail on the Web, and create a filter: "From: **". Pick "Skip the Inbox," "Mark as read," "Apply label" (I chose "Forwarded mail," but whatever works), and "Forward to" (fill in your Mobile Me address). This forwards all your Gmail messages to your Mobile Me Inbox but removes them from theGmail Inbox so you don't end up with two copies of everything in your Mail.app inbox. I wouldn't want to actually trust Mobile Me with KEEPING my e-mails since they evidently randomly lose people's e-mail.
- On the iPhone, set up your Mobile Me account however you want it. Either don't bother with the Gmail account or inactivate it. No reason to be polling for mail that you have just instructed NOT to appear in your Inbox.
That's it. E-mails sent to your Gmail account will be "pushed" (in scare quotes because...sometimes they are, and sometimes they aren't) to your iPhone through Mobile Me. They will show up in Mail.app's Inbox, where they can be filed into Gmail IMAP folders just as if they'd arrived via Gmail's inbox, and if you get squirrely and think you missed something, you've got your "Forwarded mail" folder with all the mails that have been sent to Mobile Me. Easy enough to empty it from time to time.
This is a helluva kludge and unworthy of both Apple and Google. Freaking Yahoo! has even got this figured out, for heaven's sake. Having satisfied my geek side that it could be done, I undid it all and am just using Gmail IMAP on my iPhone. It gets there fast enough, and if I'm sitting at my laptop the "push" means I have to delete and deal with stuff twice more often than not because Mobile Me doesn't reliably mark iPhone e-mails as read after I read them on my Mac. (This "feature" is a Big Pain in the Butt, although the effect is the same as getting e-mail pushed through POP to my BlackBerry.) But I felt I should post my findings anyway given that I pieced this solution together myself and therefore don't know if it's already out there somewhere (I couldn't find it despite wasting hours of my life that I will never get back!).
UPDATE 12/21/08: I found an easier way to deal with this, and happily before I wrote about it I found that someone else already has. I don't archive my Gmail copies, though; I leave them in my inbox so I can file them in Gmail. This is easy to deal with if you don't get hundreds of e-mails a day (I don't; most people seem to text me or Facebook me these days). It ends up being about like my BlackBerry system was; I had POP Gmail on the Berry because IMAP Gmail doesn't push to BlackBerries either, so I had to deal with the inbox copies then too. Another possible downside is that the mails sent from the iPhone are stored in Mobile Me's Sent folder, so if you really really want those in Gmail you have to go get them. But if you just want to know immediately that there is e-mail lurking for you, this is a workaround. Can I say again how bitter I am that Yahoo! can get this right but Gmail refuses? OK. Done.