Configure Gmail IMAP accounts properly in Apple Mail and on the iPhone

apple mail

Configuring a Gmail IMAP account properly in desktop email clients can be tricky, since many desktop clients will try to create their own Drafts, Sent Messages, etc. folders and not use the ones already provided by Gmail.

Enabling IMAP on your Gmail account:

Log in via the web interface (‘http://www.gmail.com/‘ if you’re using plain Gmail, ‘http://www.google.com/a/{domainname.com}‘ if you’re using Google Apps For Your Domain), then click the ‘Settings‘ link in the top right-hand corner of the page. Choose the ‘Forwarding and POP/IMAP‘ tab, then disable POP and enable IMAP.

Click on the ‘Labs‘ tab, scroll down to the ‘Advanced IMAP Controls‘ item and enable it, then scroll to the bottom of the page and click the ‘Save Changes‘ button.

Configuring the Gmail IMAP account in Apple Mail:

Launch Mail.app and open its Preferences window by clicking ‘Mail‘ -> ‘Preferences…‘ in the menubar at the top of the screen.

Switch to the Accounts tab and click the ‘+‘ button to add a new account. Enter your Full Name, Email Address and Password, then uncheck the ‘Automatically set up account‘ checkbox and click the ‘Continue‘ button. Change the Account Type to IMAP, give the account a name under Description, change the Incoming Mail Server to ‘imap.gmail.com‘ and fill your User Name (your full email address) and Password in, then click the ‘Continue‘ button.

Specify a name for your Outgoing Mail Server under Description (e.g. ‘Gmail SMTP’), set the Outgoing Mail Server to ‘smtp.gmail.com‘, check the ‘Use only this server‘ checkbox, check the ‘Use Authentication‘ checkbox, and fill your User Name (your full email address) and Password in again. Click the ‘Continue‘ button, then the ‘Create‘ button to create the account.

Select your Gmail account in the Mail Preferences window. Click on the ‘Mailbox Behaviors‘ tab and turn the ‘Store draft messages on the server‘, ‘Store sent messages on the server‘, ‘Store junk messages on the server‘, ‘Move deleted messages to the Trash mailbox‘, and ‘Store deleted messages on the server‘ checkboxes on.

Change the ‘Delete sent messages when:‘, ‘Delete junk messages when:‘, and ‘Permanently erase deleted messages when:‘ settings to ‘Never‘, then select the ‘Advanced‘ tab and change the ‘IMAP Path Prefix‘ to ‘[Gmail]‘.

Close the Mail Preferences window and look for the Gmail account’s name at the bottom of the left-hand sidebar. Flip the triangle next to the account’s name to show all folders inside it.

In the next step, you can either set Mail to move deleted messages to All Mail (which will require that you drag messages to the Trash folder on the server if you want to permanently delete them), or toTrash (which will require that you drag messages to the All Mail folder on the server if you want to preserve them):

Click on the ‘All Mail‘ (or ‘Trash‘, depending on your preference) folder, choose the Mailbox menu item in the menubar at the top of the screen, then choose ‘Use This Mailbox For‘ -> ‘Trash‘.

Click on the ‘Drafts‘ folder, choose the Mailbox menu item in the menubar at the top of the screen, then choose ‘Use This Mailbox For‘ -> ‘Drafts‘.

Click on the ‘Sent Mail‘ folder, choose the Mailbox menu item in the menubar at the top of the screen, then choose ‘Use This Mailbox For‘ -> ‘Sent‘.

Click on the ‘Spam‘ folder, choose the Mailbox menu item in the menubar at the top of the screen, then choose ‘Use This Mailbox For‘ -> ‘Junk‘.

Configuring the Gmail account on an iPhone:

Go to the iPhone’s Home screen and launch the Settings application. Select the ‘Mail, Contacts, Calendars‘ option, choose ‘Add Account…’, then choose ‘Other’ (The Gmail option listed on this screen is for POP account setup).

Enter a Name, Address, Password and Description, then touch the ‘Save‘ button. Choose the ‘IMAP‘ tab, enter ‘imap.gmail.com‘ as your Incoming Mail Server and ‘smtp.gmail.com‘ as your Outgoing Mail Server, then enter your User Name (your full email address) and Password for both, then touch the ‘Save‘ button again.

Once account setup has finished, go to the main screen of the Settings application, choose your email account, and select the ‘Advanced‘ item.

Change your ‘Drafts Mailbox‘, ‘Sent Mailbox‘, and ‘Deleted Mailbox‘ settings to their respective folders in ‘[Gmail]‘, then change the ‘Remove‘ setting to ‘Never‘. Change the ‘IMAP Path Prefix‘ setting to ‘[Gmail]‘.

Mike The Situation

Mike The Situation

Geek Master at Geekology
Master of programming and general geekness.
Mike The Situation
About Mike The Situation
Master of programming and general geekness.

No Comments, Be The First!

Your email address will not be published.