Skip to content
MailsOnMine
EN ES
Log in Get started free
  1. Home
  2. Setup guides
  3. Gmail

Gmail IMAP and SMTP settings

Everything you need to add a Gmail account to any email app over IMAP: the server settings, the app password Google requires, and what to do when the connection fails.

Updated: September 25, 2026 · MailsOnMine

Quick answer

SettingIncoming (IMAP)Outgoing (SMTP)
Serverimap.gmail.comsmtp.gmail.com
Port993465
EncryptionSSL/TLSSSL/TLS
UsernameYour full Gmail address
PasswordA 16-character app password (not your Google password)

SMTP also works on port 587 with STARTTLS. Use it if port 465 is blocked on your network.

Before you start

  • Google no longer lets third-party apps sign in with your normal Google password. Any app that asks for a password needs an app password instead.
  • App passwords only appear once 2-Step Verification is turned on for your Google Account.
  • Gmail keeps IMAP access turned on for every account, so there is no IMAP setting to enable in Gmail itself.
  • On a Google Workspace (work or school) account, your administrator can disable app passwords or IMAP. If the options are missing, ask them.

How to create a Gmail app password

  1. Open myaccount.google.com and go to Security.
  2. Turn on 2-Step Verification if it isn’t on already.
  3. Go to myaccount.google.com/apppasswords, or type “App passwords” into the search bar at the top of your Google Account.
  4. Enter a name you’ll recognise, such as “MailsOnMine”, and click Create.
  5. Copy the 16-character password Google shows you and paste it into your email app’s password field. Spaces don’t matter. Google shows it only once, so if you lose it, delete it and create a new one.

Common errors and how to fix them

“Username and password not accepted” or AUTHENTICATIONFAILED
You used your normal Google password. Create an app password (steps above) and use that instead.
The “App passwords” page doesn’t exist
2-Step Verification is off, your account uses Advanced Protection, or your Workspace administrator has disabled app passwords.
A working app password suddenly stops working
Google revokes all app passwords when you change your Google Account password. Create a new one.
Connection timed out
Your network or hosting provider is blocking outgoing mail ports. For sending, try port 587 with STARTTLS instead of 465.

Use Gmail alongside your other accounts

MailsOnMine puts Gmail, Outlook and your other IMAP accounts in one unified inbox. Add a new account, type your Gmail address and the IMAP and SMTP fields above are filled in for you. Then paste your app password.

Try MailsOnMine free

Free plan: 1 connected account, no card required.

Frequently asked questions

Is Gmail IMAP free?

Yes. IMAP access is included with every Gmail account at no extra cost.

Should I use port 465 or 587 for Gmail SMTP?

Both work. Port 465 uses SSL/TLS from the first byte; port 587 starts unencrypted and upgrades with STARTTLS. If one is blocked on your network, use the other.

Can I use Gmail in another app without an app password?

Only if the app offers “Sign in with Google” (OAuth). Any app that asks you to type a password needs an app password.

Other provider guides

  • Outlook.com and Hotmail IMAP and SMTP settings
  • Microsoft 365 (Office 365) IMAP and SMTP settings
  • Yahoo Mail IMAP and SMTP settings
  • iCloud Mail IMAP and SMTP settings
  • IMAP and SMTP settings for popular email providers
Home Setup guides Privacy Terms Cookies Contact Cookie preferences Español
© 2026 MailsOnMine.com by Rafa Marco ツ All systems operational.