5ThirtyOne

Derek Punsalan

Media Temple

How-to: Proper Gmail IMAP for iPhone & Apple Mail

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.

  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.

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.

  1. Highlight ‘[Gmail] Sent Mail’ in the sidebar and select ‘Mailbox’ (menu bar) > ‘Use This Mailbox For’ > ‘Sent’.
  2. Highlight ‘[Gmail] Drafts’ in the sidebar and select ‘Mailbox’ (menu bar) > ‘Use This Mailbox For’ > ‘Drafts’
  3. Highlight ‘[Gmail] Trash’ in the sidebar and select ‘Mailbox’ (menu bar) > ‘Use This Mailbox For’ > ‘Trash’
  4. 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!

Backblaze unlimited secure online backups Find out what Backblaze can do for your online backups

468 Comments • RSS

  1. Jon Lee says:

    This article was extremely helpful in clarifying some confusion I had about mail in general.

    As a response to the issue presented by Scott and Tjompa, the reason that Gmail does not move your deleted messages to the trash folder is because Gmail is programmed to wipe your trash can every 30 days.

    When you enable the option that says “Move deleted messages to Trash Mailbox;” your deleted messages will get a “deleted messages” label in Gmail but will still appear under the “All Mail” tab. If you physically take the messages from the trash and drag them the the trash subfolder under Gmail IMAP, then Gmail will actually move those messages from All Mail to its trash in the web interface (Deleted after 30 days).

    I hope this helps to clarify the situation.

  2. [...] Configurar Mail, Evolution, Thindebird, etc, para usar tu cuenta de Gmail con IMAP. Obtienes más de 7GB de espacio, 20MB de limite en archivos adjuntos, etiquetas (carpetas) y la posibilidad de reunir todos los mensajes de otras cuentas POP3. [...]

  3. Vika says:

    Real information, gracias!

  4. please help me! I have set up imap (in Apple mail, with gmail) but sheesh! its now downloading THOUSANDS of emails, and I really would be happy to just start from now.

  5. Fer says:

    HI can you help me please. I would like to transfer all my mail from my mac to gmail. I followed the instructions for setting up a new account in apple for the gmail. However I am having problems. When I go to my folders and drag and drop the mail into the gmail inbox, it goes to the gmail account but then it also comes back to the gmail mbox on the mac. If I delete a message in the gmail mbox it also deletes the message in my actual gmail account . I think that two are synced. I am not very computer saavy and this has become a bit of a frustration, because I had loads of emails in my googlemail that all of a sudden started importing into mail, into the gmail inbox. So I deleted them from the gmail mail account on my mac and it also deleted them from my gmail account.
    Someone please help me, all I want to do is transfer all my mail to gmail easily and in a simple way that a novice can understand with clear step by step instructions. My mac has run out of space and I need to do something. I would be happy to talk to anyone on the phone.

  6. Tom says:

    @Scott, re your 2 issues. See http://is.gd/jZwv (will direct you to complexdiagrams.com). Basically, it explains that you actually need to change some of your Mail.app account settings to the OPPOSITE of what gmail recommends. DON’T store drafts on server; DO move deleted messages to the trash mailbox and DO store deleted messages on the server.

    @onebadhobit, the link above also addresses your problem with downloading all of your old messages to your desktop.

  7. [...] din e-postklient och för att konfiguera IMAP för Apple Mail rekommenderar jag följande guide. Själv har jag även genom iTunes synkroniserat mitt IMAP-konto med min iPod touch. Så länge jag [...]

  8. Ace says:

    This info is out of date. There is a wiZard to guide you through the process of setting up a gmail acct on the iPhone now

  9. notha says:

    I notice imap works much better with mydomain email, syncs quite nicely, I stopped using Gmail.

  10. Nick says:

    Thanks for this. I’m having a problem: when I go to “Advanced,” “Sent Mailbox” isn’t listed — only “Drafts Mailbox” and “Deleted Mailbox.” Any ideas?

    • Derek says:

      Try backing out of the advanced view and waiting a few seconds before going back in. The phone needs a little time to connect to Gmail to return the folders.

  11. Nick says:

    Thanks Derek. Still not seeing it. I set up my iPhone to sync with Google Calendar and Contacts using Microsoft Exchange push — could it be that that somehow interferes?

    By the way, on another topic, I still haven’t been able to get my Apple Address Book to sync with Google contacts. It’s been a few weeks since I’ve scoured blogs, but last I checked I couldn’t find any solutions.

  12. Nick says:

    I hadn’t disabled POP in Gmail because the Google Mac Blog says to enable POP for accessing Gmail on Apple Mail (http://mail.google.com/support/bin/answer.py?hl=en&answer=13275). I disabled it a few hours ago and have checked a few times — still no “Sent Mailbox.”

    Thanks also for the link re: the Address Book-Gmail Contacts issue I’m having. Yes, I followed those instructions (from a different site), but this is the first time I’ve seen mention of MobileMe — do I have to use MobileMe?

    • Derek says:

      My only recommendation is to delete the account off your phone and try setting it up again. When you do setup the account, are you selecting the Gmail option (with the Gmail logo)? Or are you doing a manual configuration. The manual route will work better for accessing mail via IMAP (which needs to be enabled in your Gmail account).

      Re: Address Book, I currently have MobileMe disabled and the sync is still active for Google contacts.

  13. Nick says:

    Thanks Derek, I’ll try that. I had selected the Gmail option before — should I not?

    Also, re: disabling POP, the instructions I sent you were for Apple Mail 3.0, whereas I have 3.5. I’ve disabled POP, and seem to be getting my Gmail emails in Mail just fine.

    Finally, I actually got my contacts to sync. There’s one weird bug: duplicates showing up in Gmail Contacts, but not in Address Book. But I’ll figure it out.

    Thanks again for your help.

    N

  14. Mike says:

    I found some great info about getting rid of the Spam, All Mail, and Starred. Click Settings => Labs, Scroll down, find Advanced IMAP Controls and scroll back up clicking save. Click Settings => Labels and you should now have check box’s beside each folder/label. Deselect the ones you don’t want to show up in your IMAP client. I deselected SPAM, All Mail, and the Starred entries. After a few mins the entries in your iphone will be removed.

    • Derek says:

      Keep in mind that there is a downside to using the advanced IMAP folder controls in Gmail to hide the Spam folder. If you receive a spam message in your inbox (while reading mail from the iPhone), you will not be able to file the message to the Spam folder from your handset [to mark it as spam].

  15. Herman says:

    I was wondering if the iPhone can indicate whether or not you received an e-mail that is being moved to a label folder automatically?

    Currently I have to access the lapel folder then the e-mail is brought to my phone.

    • Derek says:

      Unfortunately, the only way to check for filtered mail sent to a folder other than the inbox can only be done manually. Same issue exhibited in the desktop Mail.app as well.

  16. Matt says:

    Hi there,

    Was hoping that someone could help me. When i’m composing an email, Mac Mail saves a draft every few seconds, so that in my draft folder, I have like 10-15 emails charting hte progress of me writing an email. It’s almost like my Mac Mail draft box is on autosave! it’s driving me nuts.

    Anyone help??

    • Raphael says:

      I’m having the same problem! As I write a new email from Mac Mail 3.5, I receive an email from myself on my Blackberry every few seconds, charting the progress of what I’m writing.

      I tried deleting and re-setting my IMAP Gmail account, but it didn’t help.

      Anyone have any ideas?

  17. Rick says:

    Hi. Thanks for the info, it’s great. I’m running into an interesting issue that I can’t find referenced anywhere. I wonder if what I do is more rare. Note that this all worked when I was hosting my own mail, but now that I’ve switched to Gmail hosting, this behavior has started.

    I have a few mail folders on the server. I have rules in Apple Mail to move incoming messages to these folders. This works, but they’re also now getting marked as read. A manually-moved message also gets marked as read (if moved in Mail). If I move it in the Gmail web UI, it doesn’t get marked as read.

    Any ideas? Thanks!

  18. Joe says:

    In using regular gmail with IMAP I can add the prefix [Gmail] and it maps things well. Using gmail for domains if I use the [Gmail] prefix on my iPhone the inbox is grayed out and I cannot open my inbox. Any thoughts?

  19. John says:

    Does anyone know of a resolution to the issue of Gmail IMAP not syncing reply or read flags?

  20. Sara says:

    THank you SO much for publishing this. I have been going crazy to find the easiest way to map everything so I don’t see double. The only thing that bugs me still is that when you hit delete it only goes to archive versus directly to trash. But it’s great just to see one folder for each as opposed to server versus local. Thanks again. Very helpful!

Leave a Reply

Comments may be held for moderation. If your comment does not appear immediately, do not repost. I reserve the right to remove any inappropriate or off-topic comments. If you plan on sharing helpful code, please pass it through Postable first. Want other to know who you are? Register a Gravatar.

Anti-Spam Protection by WP-SpamFree

Syndicate

Subscribe via RSS or Email

Advertisements

9rules network

5THIRTYONE

Public projects

Select project

Something new

Fresh content

Show Latest

Google, the noun that became a verbGoogle. Openly embracing and sharing your info with the online giant... Or trying your best to keep your data hidden from Vader? After you watch the clip, check out this infographic of ... Link