New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
SMTP and APIUpdated 4 Nov 2026

IMAP settings for Gmail, Outlook, Yahoo, iCloud and Zoho: server and port cheat sheet

A practical cheat sheet of IMAP incoming server names, ports and security settings for Gmail, Outlook.com, Yahoo, iCloud and Zoho, with the authentication rules that most often block a mail client from connecting.

IR
Written by Ishita Rao
Email Authentication Engineer
Reviewed by Kenji Watanabe
  • Published28 Nov 2023
  • Read time6 min
  • Length1,293 words
Share this guide

For almost every modern provider, IMAP settings come down to three values: the incoming server name, port 993 and SSL/TLS encryption. The username is normally your full email address, and for Gmail, Yahoo and iCloud the password is usually an app-specific password rather than your normal login password.

This sheet lists the server names for Gmail, Outlook.com, Yahoo, iCloud and Zoho, explains the settings that matter, and covers the errors people hit when a client refuses to connect. Providers change names, authentication rules and menu paths from time to time, so treat the table as a starting point and confirm against the provider's current documentation if a value does not work.

Port993 with SSL/TLS (implicit TLS) is the standard for IMAP
Plain port143 with STARTTLS exists, but 993 is simpler and preferred
UsernameThe full email address in nearly all cases
PasswordApp password or OAuth sign-in for most large providers

IMAP settings by provider

ProviderIncoming serverPort and securityNotes
Gmailimap.gmail.com993, SSL/TLSUse an app password (requires 2-Step Verification) or a client that supports Google sign-in (OAuth)
Outlook.com, Hotmail, Liveoutlook.office365.com993, SSL/TLSMicrosoft has been moving consumer accounts to modern authentication, so use a client that supports Microsoft sign-in
Yahoo Mailimap.mail.yahoo.com993, SSL/TLSGenerate an app password in Account Security
iCloud Mailimap.mail.me.com993, SSL/TLSRequires an app-specific password from your Apple Account
Zoho Mailimap.zoho.com993, SSL/TLSIMAP access must be enabled in Zoho settings. Other regions use their own domain, such as imap.zoho.eu or imap.zoho.in

For Microsoft 365 work and school accounts the server is also commonly outlook.office365.com, but an administrator may restrict IMAP or require modern authentication. See Outlook and Microsoft 365 settings for the sending side.

How to read each setting

  • Server name. A DNS hostname. A typo here produces errors such as host not found or connection timed out.
  • Port. 993 is IMAP over implicit TLS: the connection is encrypted from the first byte. Port 143 starts in plain text and upgrades with STARTTLS.
  • Security. Choose SSL/TLS for 993 and STARTTLS for 143. Mixing them, for example STARTTLS on 993, causes a hang or a handshake error.
  • Username. Use the full address unless the provider documents otherwise. Zoho and some hosted domains need the full address of the mailbox, not an alias.
  • Authentication. Normal password, app password or OAuth 2.0. The client must support whichever method the provider requires.

If you are unsure what IMAP does compared with POP3 and SMTP, read IMAP, POP3 and SMTP compared. In short, IMAP keeps mail on the server and synchronises folders and read state across devices, while SMTP only sends.

App passwords and OAuth

Major providers have stopped accepting your ordinary account password from third-party mail clients. Two methods replace it. An app password is a generated, single-purpose password that you paste into the client. OAuth 2.0 lets the client open the provider's own sign-in page and receive a token, so no password is stored in the client at all. Where a client offers a Sign in with Google or Sign in with Microsoft button, use it.

To create an app password you normally need two-step verification switched on first. The menu names differ between providers and change over time, so search the provider's help for app passwords. Our overview app passwords explained covers when each is needed, and OAuth 2.0 for SMTP and IMAP explains the token flow.

Test the connection before blaming the client

When a client says it cannot connect, test the server directly. If the test works, the problem is in the client settings. If it fails, the problem is the network, the server name or the credentials. The OpenSSL client is available on Linux, macOS and Windows with a recent installation.

openssl s_client -connect imap.gmail.com:993 -quiet
# After the greeting (* OK ...), type the following lines:
a1 LOGIN [email protected] app-password-here
a2 LIST "" "*"
a3 LOGOUT

A successful login returns a1 OK, and a failed one returns a1 NO with a reason. A connection that never prints the greeting points to a firewall, a wrong port or a security mode mismatch. Do not paste a real password into shared terminals or logs, and rotate any app password you test with.

Minimal client configuration examples

Most clients accept the same four values. In a configuration file for a tool such as isync (mbsync), the Gmail incoming block looks like this.

IMAPAccount gmail
Host imap.gmail.com
Port 993
User [email protected]
PassCmd "pass show mail/gmail-app-password"
TLSType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt

The same pattern works for the other providers: change the host, keep port 993 and IMAPS. For Python scripts, the standard library imaplib.IMAP4_SSL(host, 993) follows the same rule and expects an app password or OAuth token.

Choosing IMAP, POP3 or both

  1. Use IMAP if you read mail on more than one device. Folders, flags and deletions stay consistent.
  2. Use POP3 only if you need to download and remove mail from the server, for example to archive locally. See POP3 and how it compares with IMAP.
  3. Remember that iCloud does not offer POP3, so IMAP is the only choice there.
  4. Keep outgoing mail on SMTP with its own settings: port 587 with STARTTLS or 465 with SSL/TLS, depending on the provider.

Troubleshooting

SymptomLikely causeFix
Authentication failed or invalid credentialsNormal password used where an app password or OAuth is requiredCreate an app password, or use the client sign-in button
Cannot connect to server, timeoutWrong server name, port blocked by firewall or antivirus mail scanningCheck the hostname, try another network, disable mail scanning that intercepts port 993
Handshake or SSL errorSecurity type mismatch, for example STARTTLS selected for port 993Use SSL/TLS with 993 or STARTTLS with 143
Certificate warningOld client, wrong server name or a device clock that is wrongCorrect the hostname and the date and time. Do not click through repeated warnings
IMAP disabled messageAccess switched off in provider settings or by an administratorEnable IMAP in the account settings or ask your administrator
Folders missing or sent mail in the wrong placeFolder mapping not set in the clientMap Sent, Drafts and Trash manually in the account settings
Works on the phone but not the desktop clientClient does not support the required sign-in methodUpdate the client or switch to one that supports OAuth

Security habits for mail client credentials

  • Use a separate app password for each device or application so that you can revoke one without affecting the rest.
  • Never share the app password in tickets or chat. Treat it as equivalent to your account password for mail.
  • Prefer OAuth where the client offers it, because tokens can expire and be revoked.
  • Keep operating systems and mail clients updated, since older TLS libraries may be rejected by providers.
  • Avoid public Wi-Fi without a VPN when you must use unencrypted port 143, or better, do not use it at all.

Incoming settings are only half of the picture. To send mail from the same client you also need the matching outgoing server, covered for Gmail in Gmail SMTP settings and for Apple in iCloud SMTP settings. If the client refuses to authenticate for sending, SMTP 535 authentication failed explains the cause.

When to use these settings and next steps

Use this cheat sheet when you add an existing mailbox to a client such as Thunderbird, Apple Mail, Outlook or a phone app. If you run your own application that must send transactional or bulk mail, do not route it through a personal mailbox. Personal mailboxes have sending limits and are meant for people. A dedicated relay with its own credentials, proper authentication and event reporting is a better fit, and the incoming IMAP settings above do not apply to it.

Sending from an application? Use a dedicated SMTP relay with its own credentials instead of a personal mailbox.

Explore the SMTP relay

References and further reading

Frequently asked questions

What are the IMAP settings for Gmail?

Server imap.gmail.com, port 993, SSL/TLS, your full address as username and an app password or Google sign-in as authentication.

Which IMAP port should I use?

Port 993 with SSL/TLS is the standard choice. Port 143 with STARTTLS also exists but is less commonly recommended.

Why does my correct password fail over IMAP?

Large providers usually require an app password or OAuth for third-party clients, so the normal account password is rejected.

Does iCloud support POP3?

No. iCloud Mail is accessed with IMAP, using imap.mail.me.com on port 993 and an app-specific password.

Are IMAP settings the same as SMTP settings?

No. IMAP receives and syncs mail from one server, while SMTP sends mail through another, with its own host and ports.

Topics#imap#mail client#port 993#gmail#outlook#yahoo#icloud#zoho
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales