UPDATE 11/18: inaequitas reminds us that in order to star messages on your iPhone, simply move the message the starred items directory.
UPDATE 10/26: RayL re-confirms the advantage of mapping your client-side Sent, Drafts, & Trash with server-side Gmail labels – no duplicate labels created in Gmail by your email client(s). Experiment with Gmail IMAP setup; if necessary reference the Google Group thread below.
UPDATE 10/25: If you start seeing duplicates, check this Google Group thread. Google may have made updates to Gmail IMAP access. YMMV.
The latest news on the street is that Google is slowly rolling out a much anticipated feature – IMAP support. If you point your browser to Gmail Help documentation outlining the steps necessary to get your mail clients setup for IMAP, you’ll soon realize the the directions are the bare minimum. It is recommended that you follow the directions from start to finish, but the actual configuration does not stop there.
Take a look at both IMAP support pages for Apple Mail and the iPhone. Both share similar steps including:
- Incoming Server: imap.gmail.com
- Outgoing Server: smtp.gmail.com
- Authentication: email@gmail.com + email password
- ‘Use secure Socket Layer (SSL)’
- Ports: 587 Outgoing, 993 Incoming
There is nothing wrong with leaving your email clients as-is exactly as the Gmail Help documents instruct. Unfortunately, you will start to see a little inconsistency between your email clients and your Gmail web interface.
Diligent Gmail "labelers" will soon discover that those handy "tags" that they had been assigning to emails are now recognized as Folders in their email client(s). Your email clients will sync this Folders without a problem. In order to ensure your Trashed, Sent, Drafts, and Junk mail messages are sorted properly between your iPhone, Apple Mail, and Gmail’s webmail interface, you will need to add a few more steps to the initial setup instructions offered by Google.
Properly sort Drafts, Deleted, and Sent mail on the iPhone
Assuming that you have followed the iPhone IMAP setup instructions, it is now time to properly configure your mobile Mail client so that Sent Mail, Deleted Mail, Drafts, and Junk are reflected properly after syncing back between the webmail client and any other desktop clients you may have.
- Open ‘Settings’ > ‘Mail’ > [Your Gmail IMAP account] > ‘Advanced’
- Select ‘Drafts Mailbox’ > ‘On the Server’ > ‘[Gmail] Drafts’. Return to the ‘Advanced’ view.
- Select ‘Sent Mailbox’ > ‘On the Server’ > ‘[Gmail] Sent Mail’. Return to the ‘Advanced’ view.
- Select ‘Deleted Mailbox’ > ‘On the Server’ > ‘[Gmail] Trash’. Return to the ‘Advanced’ view.
Any emails sent from your iPhone will appear in Gmail’s ‘Sent’ view, any saved drafts saved on your iPhone will appear in Gmail’s ‘Drafts’ view, and any deleted messages will be reflected in Gmail’s ‘Trash’ view.
Properly sort Drafts, Deleted, and Sent mail in Apple Mail
Similar steps must be taken to ensure that any emails sent, saved as drafts, or deleted are properly identified by Gmail’s servers. After completing the IMAP setup steps for Apple Mail, instructing Mail is a few simple clicks away. Once your Gmail IMAP account is added to Mail, you’ll notice your [Gmail account] in the left sidebar.
- Highlight ‘[Gmail] Sent Mail’ in the sidebar and select ‘Mailbox’ (menu bar) > ‘Use This Mailbox For’ > ‘Sent’.
- Highlight ‘[Gmail] Drafts’ in the sidebar and select ‘Mailbox’ (menu bar) > ‘Use This Mailbox For’ > ‘Drafts’
- Highlight ‘[Gmail] Trash’ in the sidebar and select ‘Mailbox’ (menu bar) > ‘Use This Mailbox For’ > ‘Trash’
- Highlight ‘[Gmail] Spam’ in the sidebar and select ‘Mailbox’ (menu bar) > ‘Use This Mailbox For’ > ‘Junk’
Once properly configured, managing email from Apple Mail or the iPhone will be no different from managing emails within the Gmail web client – sent, drafts, trash, and junk properly sorted between your various email clients and web interface. [Digg this]
IMAP Gmail gems for Apple Mail & iPhone
I am certain that Gmail’s IMAP documentation is far from complete. The following will serve as a running list of details I have noticed – found by sharp readers or myself – not yet included in the Help pages.
- Flagging messages in Apple Mail (CMD+SHIFT+L) is the same as adding a Star to a message in Gmail. Try it out for yourself. Flag a message in Mail and check your Gmail account online. The same message magically appears as ‘Starred’.
- In order to "label" messages multiple times from within Apple Mail or the iPhone, you must copy the message(s) to each respective ‘Folder’ which corresponds with your Gmail Label. I think it’s time to move back to the idea of Folders as opposed to Labels.
- If you wish to Archive mail from your iPhone, simply move the message to ‘[Gmail] All Mail’.
- gec added this comment: "when you delete something from a folder other than trash, the message will effectively be archived, and not deleted. that means, the label corresponding to the folder you are deleting it from will be removed. if however you *move* it to Trash you will remove all labels assigned to it. bad for filter rules."
- Jonathan added this tip: "if you’d like to use a custom from address when sending from iPhone (not your Gmail address) just pop it in the Email Address field (not the authentication fields) and it will use that address instead of your Gmail."
- Want to send mail as a different email address on a case-by-case basis with Apple Mail? Follow the directions outlined in this comment. YMMV
- MSK added: "if you want to get rid of that extra [Gmail] hierarchy. Go in to your advanced email settings and for ‘IMAP Path Prefix’ type [Gmail] now go back and reassign your Sent, Deleted, and Draft mail boxes, if needed."
Similar rules apply for any other IMAP desktop or mobile client that you might be using. In order to prevent unnecessary labels from being created during synchronization, make sure that your Sent, Drafts, Junk, and Trash Mailboxes are configured properly.
Business Email Solutions
If you like to have your email on the go you’ll love the freedom that comes with an outlook exchange server. When you use intermedia as your email hosting solution you can access your email from any internet connected windows device, and take care of business on the road!




[...] How to setup Google Mail properly on your iPhone – great guide and ensures folders are aligned properly. [...]
[...] http://5thirtyone.com/archives/862 [...]
[...] http://5thirtyone.com/archives/862 [...]
Jonathan added this tip: “if you’d like to use a custom from address when sending from iPhone (not your Gmail address) just pop it in the Email Address field (not the authentication fields) and it will use that address instead of your Gmail.”
This doesn’t work… At least with IMAP Gmail… It only has fields for incoming/outgoing email addresses… and it uses both for authentication. So there is no place to put a different FROM and still have it authenticate.
In fact, it seems to take the FROM from the “default account”… DUMB!
It works fine if you use the proper field. As the original poster said, NOT THE AUTHENTICATION FIELDS. Go to Mail–>Preferences–>Accounts–>Account Information tab. There are then fields “Description” and “E-mail address”. This E-mail address is the one you should change to whatever you want. The interesting thing about this field is that it’s actually misnamed – it should be “E-mail address(es)”. You can list multiple E-mail addresses separated with a comma and space, and then you can choose from them as the from address when you send a new message.
[...] emails from my own domain and not from the gmail.com address I used the iPhone’s ability to access GMail as a generic IMAP email server rather than using the built in GMail [...]
“Properly sort Drafts, Deleted, and Sent mail on the iPhone”
1. Open ‘Settings’ > ‘Mail’ > [Your Gmail IMAP account] > ‘Advanced’
2. Select ‘Drafts Mailbox’ > ‘On the Server’ > ‘[Gmail] Drafts’. Return to the ‘Advanced’ view.
3. Select ‘Sent Mailbox’ > ‘On the Server’ > ‘[Gmail] Sent Mail’. Return to the ‘Advanced’ view.
4. Select ‘Deleted Mailbox’ > ‘On the Server’ > ‘[Gmail] Trash’. Return to the ‘Advanced’ view.”
On an iPod Touch, for some reason, there is no option to modify settings for Sent, only Drafts Mailbox and Deleted Mailbox.
Anyone know why that is? Why would it be any different on an iPod Touch?
“MSK added: “if you want to get rid of that extra [Gmail] hierarchy. Go in to your advanced email settings and for ‘IMAP Path Prefix’ type [Gmail] now go back and reassign your Sent, Deleted, and Draft mail boxes, if needed.”
In these instructions, I wasn’t certain whether I was supposed to enter bracket Gmail bracket or just Gmail and if the capital ‘G’ in ‘Gmail’ makes a difference. I just hosed the whole thing and now all 8,000 messages are re-importing back.
When I literally typed in [Gmail] it did remove the hierarchy like it said it would, it removed all the labels/folders I had created, not the top hierarchy like I thought it would have. I just guessed totally wrong on these instructions. Doh!
You’re not alone, TheMacMommy, I tried to remove the “extra [Gmail] hierarchy” thinking the labels/folders would become part of my main mailboxes. Instead they are gone altogether and I have no idea what is going on with Mail. Thinking of deleting the account and starting again.
ok, I think I have it all straightened out now. Here are some screen shots of my progress. Maybe it makes sense to you, maybe you agree with me that I’m nuts
@kristarella I figured out by dragging the folders manually to the home folder, it will do what we were thinking. See screen shots below and take a look at the way Gmail names the label after I’ve moved it to the folder.
Part 1: http://skitch.com/macmommy1228/bac9d/mail-gmailcomparison
Part 2: http://skitch.com/macmommy1228/bapb2/gmail-mail-comparison-part-2
Thanks! Muchly appreciate the screenshots.
I deleted the account on my Mail and remapped the main mailboxes to their Gmail counterparts. Not sure if I’ll rearrange things as you have, but I see what’s going on now!
Hi
I just started using Mac Mail 3.6 with Gmail. I followed the instructions above and things seemed fine, when all of a sudden, the Mail program decided to download all the mail from my Gmail account (which being may years old) downloaded a couple gigs of duplicate mails under the Gmail \ All Mail folder in addition to my Inbox. Anyone know how I can fix this and have one place for receiving mail (my Inbox) and so that the Gmail \ All Mail will not download any mails?
Thanks
Thank you, thank you, thank you. For some reason, I was having the hardest time getting my gmail account working on my iPhone. I guess I’m kinda iPhone handicapped since I just came from a Blackberry
This is all very helpful!
However, I am encountering some strange things in Apple Mail.
1. When I delete and item from my inbox (send it to trash) and then I go into trash to move it back into my inbox, I noticed that the sender name and subject is no longer displayed in my inbox.
2. There is no draft folder in my Apple Mail even though one exists on gmail albeit with 0 drafts in it.
Thanks for any help,
Jeff
Jeff,
That same thing happens to me in Mail however if I move something from the trash folder back to the inbox, eventually the name/subject is displayed. I think it takes a little longer to update from the server?
As far as the Drafts folder is concerned, I noticed that unless I physically have composed a draft message, there will NOT be a Drafts folder in Mail regardless of whether Gmail web UI displays it. So long as I keep at least 1 draft message sitting there in the Mail.app, then it does show up with 1 draft message everywhere else, i.e., iPod Touch, Gmail, Mail.
Hope that helps?
I had everything ok with Google IMAP advanced controls and Gmail and Mail mailboxes linked. But today I found all my Gmail folders duplicated under “To Do” and I can’t hide them or delete them. Does anyone know how to do it? Thanks.
OMD! Thank you so much! Exactly what I wanted!
I’ve found that if you use the server-side trash and drafts folders, then while you are composing a long message, tons of draft copies of it end up in the Trash folder. I’m guessing because gmail automatically moves expunged things to the trash per default.
To work around this, go into the Google Labs settings, enable Advanced IMAP settings, and then go into gmail–>settings–>Forwarding and POP/IMAP, turn OFF auto-expunge, and change “When a message is expunged from the last visible IMAP folder” to “Immediately delete the message forever”. Save, then quit Mail, wait a couple minutes, and start it up again.
Apple Mail will still move deleted messages to the Trash, as per the account settings. Drafts will then be saved on the server properly without tons of copies showing up in the server-side trash.
Casey, I was wondering what was going on here. Thank you so much for your solution(Advanced IMAP)! I’m not sure if I would have found it otherwise. Getting this whole Apple Mail, gmail.com, iPhone configuration correct is more painful that I thought. I think I’m almost at mail nirvana…
That was driving me crazy when I enabled another IMAP / Gmail account in Mail. Promised myself I would start 2010 with IMAP and my iPhone Gmail Mail in sync. That was (seemingly) the last sticking point. 18 hours to spare. Thanks, Casey!
I have a question about using Mac Mail with 2 email addresses, one gmail, the other from my domain name. Every email that is sent to my domain name is received twice.
In Mail if I select ‘Inbox’ it reveals 2 different inboxes, (gmail) and (domain name). Is this the problem?
I have checked my Mail Preferences, ensured there’s no forwarder on my domain email address, and scoured mac forums for potential clues…
Any help greatly appreciated!
Adding two separate email accounts to Apple Mail will create two different inbox views (if you expand the top level inbox level). Mail does this so that you can look at a combined view of both account inboxes.
I can’t comment on your issue of receiving duplicate emails for your domain account. Is it a Gmail hosted account, work issued, or through your hosting service?
I set up my iPhone to map to gmail but am now unable to send messages. I receive messages just fine. Does anyone know how to set the outbound port to the 587 setting mentioned in this document?
Thx.
I’d love to have deleting a message in Mail.app actually move a message to the trash in Gmail, but I’m concerned about one thing. What happens if I move one message in a thread/conversation to an IMAP folder (i.e., give it a label), but delete another message in the same thread? Will that entire thread be moved to the trash in Gmail?
Thanks!
[...] email account from my hosting company to GMail, using Google Apps for my domain. GMail gives me IMAP, first-rate spam filtering, and more storage than I can shake a stick at. I couldn’t be [...]
[...] email account from my hosting company to GMail, using Google Apps for my domain. GMail gives me IMAP, first-rate spam filtering, and more storage than I can shake a stick at. I couldn’t be [...]
hi all,
I keep experiencing strange behaviour in Apple Mail since I switched to IMAP on my gmail.
Here’s what happens. (I configured everything correctly I think). :
A message arrives in my “inbox”, I read it, I delete it. Now I look in my trash can, I see the deleted mail there. I highlight it and press delete: it disappears and reappears right away…
So what? Now I have to delete all mails twice???
I must be doing something wrong.