sodcalculator

10 Tech How-To

Gmail IMAP Settings: How to Enable and Use Them

Guide 10-12412 · Updated · Step by step

Gmail’s IMAP settings let you sync your email across desktop clients like Outlook, Apple Mail, and Thunderbird. To use them, you enable IMAP in Gmail’s settings, then enter the server details (imap.gmail.com, port 993, SSL) into your email client. This guide covers the exact settings, the steps to turn IMAP on, and how to troubleshoot common connection problems.

What Is IMAP and Why Use It With Gmail?

IMAP (Internet Message Access Protocol) is a standard email protocol that keeps your mail stored on the server while letting multiple devices access and manage the same mailbox. Unlike POP3, which downloads messages to a single device and often removes them from the server, IMAP synchronizes folders, read/unread status, and sent items across every client you connect. For Gmail users, this means an email read on your phone appears as read in Outlook, and a message filed into a label on your desktop shows up in the same place on your tablet.

Gmail supports IMAP for all free and Workspace accounts, making it the recommended way to connect third-party email apps. When you enable IMAP, Gmail exposes your labels as folders, and changes you make in one client propagate to the others. This is particularly useful if you manage multiple inboxes or need offline access through a desktop program.

Exact Gmail IMAP Server Settings

Before configuring your client, you need the precise server parameters. These are the same for all Gmail users, whether you have a @gmail.com address or a custom domain through Google Workspace.

  • Incoming Mail (IMAP) Server: imap.gmail.com
  • IMAP Port: 993
  • IMAP Encryption: SSL/TLS (required)
  • Outgoing Mail (SMTP) Server: smtp.gmail.com
  • SMTP Port: 465 (SSL) or 587 (STARTTLS)
  • SMTP Authentication: Required, same as your IMAP credentials
  • Full Name: Your name as you want it displayed
  • Email Address: Your complete Gmail address
  • Password: Your Gmail password, or an App Password if you use 2-Step Verification

Most modern email clients auto-detect these values when you enter your address and password. If the client asks for the server manually, use the values above. For outgoing mail, port 587 with STARTTLS is the most compatible choice; port 465 with SSL also works on most providers.

How to Enable IMAP in Gmail

IMAP is not on by default for Gmail accounts. You must switch it on in your browser before any third-party client can connect. The setting lives in the Gmail web interface, not in the mobile app.

  1. Open Gmail in a web browser and sign in to the account you want to configure.
  2. Click the gear icon in the top-right corner, then select See all settings.
  3. Go to the Forwarding and POP/IMAP tab.
  4. In the IMAP access section, select Enable IMAP.
  5. Review the folder behavior options (see below) and click Save Changes at the bottom.

Once enabled, Gmail immediately allows connections from external clients. You do not need to wait for propagation; the change is instant. If you later disable IMAP, all connected clients lose access, and any local copies of your mail remain on those devices but stop syncing.

Choosing the Right IMAP Folder Settings

When you enable IMAP, Gmail gives you three options for how labels appear as folders. The choice affects how your client displays your mailbox structure.

  • Auto-Expunge: When on, messages you delete from your client are immediately removed from the server. When off, they stay in your All Mail folder until you empty Trash manually.
  • Archive and trash folder behavior: You can choose to show only the Inbox, show all labels as folders, or limit the folder list to a subset. Showing all labels is the default and works well for most users.
  • Folder size limits: Gmail caps a single IMAP folder at 500,000 messages. This rarely matters for personal accounts but is worth knowing for high-volume mailboxes.

For most people, leaving the defaults is fine. If you use many labels, your client will list them all as folders, which can be cluttered. In that case, you can select Show only the Inbox and rely on search within the client instead.

Using App Passwords When 2-Step Verification Is On

If you have 2-Step Verification enabled on your Google account, your normal Gmail password will not work with IMAP. Google requires an App Password, a 16-character code generated specifically for third-party apps that do not support the full OAuth flow.

  1. Go to your Google Account settings and select Security.
  2. Under How you sign in to Google, choose 2-Step Verification and verify it is on.
  3. Return to the Security page and select App passwords (you may need to re-enter your password).
  4. Name the app (e.g., “Outlook on PC”) and click Create.
  5. Copy the 16-character password and paste it into your email client’s password field.

You can revoke an App Password at any time without changing your main account password. This is useful if you suspect a device was compromised. Note that App Passwords are only available with 2-Step Verification; without it, use your regular password.

Common Gmail IMAP Connection Errors and Fixes

Even with correct settings, connections sometimes fail. Here are the most frequent issues and how to resolve them.

  • “Username and password not accepted”: Usually means you are using your normal password instead of an App Password, or your password was changed recently. Generate a fresh App Password and retry.
  • “Connection timed out”: Often caused by a firewall or antivirus blocking port 993. Temporarily disable the security software or add an exception for your email client.
  • “SSL certificate error”: Ensure the server name is exactly imap.gmail.com and that SSL/TLS is selected, not STARTTLS for the incoming port. Some clients default to the wrong encryption type.
  • “Too many simultaneous connections”: Gmail limits IMAP to 15 concurrent connections per account. Close unused clients or reduce the number of devices connected at once.
  • “Mailbox not syncing”: Check that IMAP is still enabled in Gmail settings. Google occasionally disables it if your account has been inactive for a long period.

If none of these solve the problem, try removing the account from your client and re-adding it from scratch. A clean setup often clears corrupted connection state.

Gmail IMAP vs. POP3 vs. Gmail API

Understanding the alternatives helps you choose the right method for your needs. POP3 downloads messages to one device and deletes them from the server by default, which is fine for a single computer but breaks multi-device syncing. The Gmail API is a modern REST interface used by web apps and custom integrations, but it requires developer credentials and is not something you configure in a standard desktop client.

For most users, IMAP is the best balance of compatibility and functionality. It works with virtually every email client, supports two-way sync, and requires no special programming. The only downside is that IMAP does not expose Gmail-specific features like labels with nested hierarchies perfectly; labels appear as flat folders, and the All Mail folder can be confusing. If you live entirely in the Gmail web interface or the official mobile app, you do not need IMAP at all.

Security and Privacy Considerations

Using IMAP means your email client stores your Gmail password or App Password locally. This is a risk if the device is lost or stolen. To mitigate this, always use an App Password rather than your main password, and enable full-disk encryption on your computer. Also, be aware that IMAP does not encrypt messages end-to-end; it only protects the connection between your client and Google’s servers using TLS. The content of your emails remains readable by Google and any recipient’s mail provider.

Google also applies rate limits to IMAP usage. Free accounts can download roughly 250 MB per day, and there is a cap on the number of messages you can fetch in a short period. For normal personal use this is never an issue, but if you are migrating a large archive, you may hit the limit. In that case, use Google Takeout to export your data instead of relying on IMAP.

Frequently Asked Questions

What is the difference between IMAP port 993 and 143?
Port 993 is IMAP over SSL/TLS, which encrypts the entire connection. Port 143 is plain IMAP and is unencrypted, so Gmail does not support it. Always use 993 with SSL/TLS for Gmail.

Can I use the same IMAP settings for a Google Workspace account?
Yes, the server settings are identical for @gmail.com and custom-domain Workspace accounts. You just enter your full Workspace email address and password or App Password.

Why does my Gmail IMAP show duplicate folders?
Gmail exposes labels as folders, and some clients also show system folders like [Gmail]/All Mail. This duplication is normal. You can hide the [Gmail] folder in your client’s folder subscription settings.

Does enabling IMAP slow down Gmail on my phone?
No, the official Gmail app does not use IMAP; it uses Google’s proprietary sync. Enabling IMAP only affects third-party clients, so your phone app’s performance is unchanged.

How do I remove an IMAP account from my email client?
In most clients, go to Account Settings, select the Gmail account, and choose Delete or Remove. This only removes the local copy; your Gmail messages stay on the server and remain accessible via the web or other connected devices.

What happens if I disable IMAP in Gmail while my client is open?
The client will lose connection and show an error on the next sync. Your local messages remain on the device but will not update. Re-enable IMAP to restore the connection without reconfiguring the client.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →