How to Use Gmail With a Third-Party Email Client

The short answer
To use Gmail with a third-party email client, enable IMAP in Gmail settings, then authorize via Google OAuth sign-in or generate an app password for legacy clients. Gmail maps all mail to a single store and treats labels as parallel IMAP folders, which causes duplicates and unexpected delete behavior in standard clients.
Enable IMAP in Gmail settings, then connect any third-party email client via OAuth. Learn why Gmail behaves differently and what to do when it breaks.
On this page
If you have ever tried to read Gmail in a client other than Google's own web interface or mobile app, you have probably hit at least one of three surprises: a password that the client rejects even though you typed it correctly, the same email appearing four or five times across different folders, or a delete key that archives instead of removes. None of those are bugs in your client. They are the result of Gmail implementing IMAP differently from every other mail server, and the fixes are straightforward once you know what is happening.
This guide covers three things: how to authorize the connection in the first place, what Gmail's IMAP behavior actually is and why it differs from what a standard client expects, and what to fix when something breaks. Google Workspace users should note one additional prerequisite: your administrator must enable IMAP for the organization in the Admin console before any of these steps will work for you.
The short answer#
Connecting Gmail to a third-party email client takes two setup steps and one credential choice. First, enable IMAP inside Gmail settings — it is off by default on new accounts. Second, authorize the client to access your account, either through Google's OAuth sign-in or through an app password if the client uses legacy credentials.
OAuth is Google's preferred method and what every modern client supports. You click Sign in with Google inside the client, a browser window opens to Google's own sign-in page, you approve the requested access, and the client receives a secure token. Your Gmail password is never exposed to the client. App passwords serve legacy clients that cannot handle OAuth: generate a 16-character code at myaccount.google.com/apppasswords, enter it as the password field, and use your full Gmail address as the username. App passwords require two-step verification to be active on the account first.
Either way, the server settings are: incoming server imap.gmail.com, port 993, SSL/TLS required; outgoing SMTP server smtp.gmail.com, port 465 with SSL or port 587 with STARTTLS. Once the connection is established, Gmail's label-based architecture introduces folder behaviors that differ from what a standard IMAP client expects — those are covered after the step-by-step instructions.
What you need before you start#
Three conditions must be in place before the connection attempt will succeed. Checking them now saves a round-trip through a credential error.
- IMAP must be enabled in Gmail. Go to Settings (the gear icon, top right) > See all settings > Forwarding and POP/IMAP > IMAP access > Enable IMAP > Save Changes. It is disabled by default.
- Google Workspace accounts: your administrator must enable IMAP access for the organization in the Google Admin console. If the IMAP toggle is missing from your Gmail settings, that is the reason.
- App password users: two-step verification must be active on your Google Account before the app password option appears at myaccount.google.com/apppasswords.
- Confirm the client supports IMAP, not POP only. IMAP syncs and leaves mail on the server; POP downloads and can remove it. This guide covers IMAP.
- OAuth users: any client built or substantially updated after 2022 supports Google sign-in. If the client presents only a server address and a plain password field with no OAuth option, it cannot connect — Google removed plain-password IMAP access in May 2022.
Google removed plain-password IMAP access in 2022
How to connect Gmail to a third-party email client#
- 1
Enable IMAP in Gmail settings
Open gmail.com and click the gear icon in the top right, then See all settings. Go to the Forwarding and POP/IMAP tab. Under IMAP access, select Enable IMAP. Scroll down and click Save Changes. This step is required even for clients that sign in through OAuth — the IMAP connection still needs to be enabled server-side.
- 2
Choose and prepare your authentication method
Modern clients: look for a Sign in with Google or Add Gmail account option and use it. Legacy clients that ask only for a server address and password: open myaccount.google.com/apppasswords, select Mail and the device type, click Generate, and copy the 16-character code immediately. You will only see it once.
- 3
Add the account in your email client
For OAuth: click Add Account, choose Google or Gmail, enter your email address, and follow the browser prompt to grant access. For app passwords: click Add Account, choose IMAP or Other, enter your full Gmail address as the username, and paste the 16-character app password into the password field. Do not enter your regular Gmail password here — it will fail.
- 4
Enter IMAP and SMTP server details if prompted
Incoming IMAP: imap.gmail.com, port 993, SSL/TLS. Outgoing SMTP: smtp.gmail.com, port 465 (SSL/TLS) or 587 (STARTTLS). Clients that completed OAuth authorization typically auto-populate these; skip the step if the fields are already filled.
- 5
Wait for the initial sync and review the folder list
Gmail creates one IMAP folder per label, plus a set of special folders under [Gmail]: All Mail, Sent Mail, Drafts, Spam, Starred, Trash, and Important. Expect a longer folder list than you are used to on other providers. The next section explains what each folder represents and how to reduce the list.
- 6
Set the delete behavior you actually want
In Gmail, go to Settings > Forwarding and POP/IMAP > IMAP settings. Under When I mark a message in IMAP as deleted and expunge the inbox, choose the behavior that matches your expectation: archive the message (Gmail default, which surprises most IMAP users), move it to Trash, or delete it immediately. Set this once before you start using the client.
How Gmail behaves differently over IMAP#
Gmail was designed around labels, not folders. IMAP was designed around folders. Gmail bridges the two by translating every label into an IMAP folder view — but the translation produces behaviors no standard IMAP client was built to handle. These six behaviors account for almost every complaint about Gmail in a third-party client.
| Behavior | Standard IMAP | Gmail over IMAP | Fix |
|---|---|---|---|
| Message storage | One message lives in one folder | Every message lives in [Gmail]/All Mail; labels appear as additional parallel folder views of the same message | Disable Show in IMAP for labels you do not use; avoid syncing All Mail in the client |
| Duplicate messages | A message exists in exactly one folder at a time | A message with three labels shows up in three IMAP folders simultaneously | Set the client to sync only Inbox, Sent, and the labels you actively use — not All Mail |
| Delete behavior | Client marks message as deleted and expunges on quit | Removes the Inbox label by default, archiving rather than deleting the message | Change in Gmail Settings > Forwarding and POP/IMAP > IMAP settings > delete behavior |
| Sent mail copies | Client saves one copy to the Sent folder | Gmail also saves a copy to [Gmail]/Sent Mail, so sent messages often appear twice | Disable the client's save-sent-copies-to-server setting, or map its Sent folder to [Gmail]/Sent Mail |
| Special folder names | Trash, Drafts, Sent are standard IMAP names clients recognize | Gmail uses [Gmail]/Trash, [Gmail]/Drafts, [Gmail]/Sent Mail, which some clients cannot map automatically | Map the client's special folders to the [Gmail]/* equivalents in account settings if prompted |
| Label hierarchy | Nested folders are independent containers | Gmail uses a slash separator: a label named Work/Project appears as a folder named Project nested under Work | No action needed — cosmetic difference only in most clients |
The root cause of most Gmail-IMAP friction is one architectural fact: every message is stored once in All Mail, and labels are applied as additional folder views on top of that single store. A client that syncs every available folder downloads the same message once per label it carries. Knowing this makes every duplicate and delete problem immediately diagnosable — and the fix is always the same: tell the client which folders to sync and which to ignore.

What to do when it does not work#
Most Gmail-plus-IMAP problems fall into one of six patterns. The table below maps each symptom to its cause and the fix. If your situation is not covered, Google's Gmail Help pages on reading Gmail through other email clients are current and address Workspace admin restrictions, rate limits, and less common connection errors.
| Symptom | Likely cause | Fix |
|---|---|---|
| Authentication failed or invalid credentials | Plain-password auth was removed in 2022; or an app password was revoked or expired | Re-authorize via OAuth sign-in, or revoke and regenerate the app password at myaccount.google.com/apppasswords |
| Same email appears multiple times | Client is syncing both All Mail and the label folders | In Gmail > Settings > Labels, uncheck Show in IMAP next to All Mail, then restart the sync |
| Delete archives instead of removing the message | Gmail default IMAP delete removes the Inbox label only, leaving the message in All Mail | In Gmail > Settings > Forwarding and POP/IMAP > IMAP settings, change the delete behavior to Move to Trash |
| Hundreds of folders visible in the client | Every Gmail label becomes an IMAP folder by default | In Gmail > Settings > Labels, uncheck Show in IMAP for labels you do not need in the client |
| Client connects but cannot send | SMTP auth is not configured or the wrong port is set | Use smtp.gmail.com, port 465 (SSL/TLS) or 587 (STARTTLS). The same app password must be used for SMTP if not using OAuth. |
| Sent mail appears twice | The client saves a sent copy and Gmail saves one to [Gmail]/Sent Mail | Disable the client's save-sent-messages-to-server setting, or map its Sent folder to [Gmail]/Sent Mail |
Check the IMAP toggle before debugging credentials
A faster way: a client built for Gmail's architecture#
The steps above establish a working IMAP connection. What they do not solve is the ongoing work that comes after the connection is set up: deciding which messages need a response, writing replies, tracking follow-ups before they go cold. A generic IMAP client reads mail and leaves the rest to you.
We build AI Emaily, an AI-native email client that connects Gmail through Google's standard OAuth sign-in and handles the IMAP quirks automatically — duplicate suppression, correct delete behavior, full label-to-folder mapping — without any manual folder configuration. Beyond the connection, AI Emaily triages incoming mail down to a short ranked list of what needs you, drafts replies in the voice you configure through your Personal Context brain and per-client profiles, and surfaces follow-ups before threads go quiet. Manual, Copilot, and Autopilot modes let you set how much the agent acts on your behalf, with undo and a full audit trail on every action. There is a 7-day free trial — see the details at aiemaily.com/pricing.
Frequently asked
See it in AI Emaily
Keep reading
Sources

Written by
Nafiul HasanNafiul Hasan is an entrepreneur and AI automation system builder with 10+ years of experience turning messy, manual workflows into reliable automated systems. He designs and ships AI enterprise solutions end-to-end — the agent logic, the data plumbing, and the product people actually use — and founded AI Emaily to give busy professionals their attention back. He writes here from the builder's seat: what works, what breaks, and how to put AI to work without giving up control.