Skip to content

IMAP and SMTP settings: set up email in Thunderbird, Outlook, Apple Mail, iPhone and Android

Last updated: 26:10:2026

Wersja polska

The settings every mail app asks for

Whatever the app looks like, the setup screen asks the same questions. An account has two halves: an incoming server, which the app uses to read your mailbox (almost always IMAP today - see IMAP vs POP3), and an outgoing server, the SMTP submission service your app hands new messages to. For each half you need a hostname, a port, a security mode, a username and a password.

SettingIncoming (IMAP)Outgoing (SMTP)
Server / hostnameanymail.techanymail.tech
Port993587
Connection securitySSL/TLSSTARTTLS
AuthenticationNormal passwordNormal password
Usernameyour full address, e.g. anna@example.comthe same full address
Passwordan app password for this devicethe same app password
Server / hostname
Incoming (IMAP): anymail.tech
Outgoing (SMTP): anymail.tech
Port
Incoming (IMAP): 993
Outgoing (SMTP): 587
Connection security
Incoming (IMAP): SSL/TLS
Outgoing (SMTP): STARTTLS
Authentication
Incoming (IMAP): Normal password
Outgoing (SMTP): Normal password
Username
Incoming (IMAP): your full address, e.g. anna@example.com
Outgoing (SMTP): the same full address
Password
Incoming (IMAP): an app password for this device
Outgoing (SMTP): the same app password

The values in the table are AnyMail's. If your mail is hosted somewhere else, the shape is the same but the hostnames come from your provider's help pages - don't guess them. One detail trips people up with any provider: the server hostname is usually the provider's name, not mail.yourdomain.com. Your domain's MX record decides where mail for you is delivered, but your app connects to whatever name the provider's TLS certificate covers. With AnyMail that is anymail.tech for every customer domain.

Ports and security, explained once

Mail clients offer a confusing menu of ports and security options. Only a few combinations make sense:

PortUsed forSecurity setting
993IMAP, encrypted from the first byteSSL/TLS (sometimes labelled "SSL" or "TLS")
143IMAP, upgraded to encryption with a commandSTARTTLS - never "None"
587SMTP submission from mail apps (RFC 6409)STARTTLS
465SMTP submission, encrypted from the first byteSSL/TLS
995POP3, encrypted from the first byteSSL/TLS
25Server-to-server delivery between mail systemsNot for mail apps - often blocked on home and mobile networks
993
Used for: IMAP, encrypted from the first byte
Security setting: SSL/TLS (sometimes labelled "SSL" or "TLS")
143
Used for: IMAP, upgraded to encryption with a command
Security setting: STARTTLS - never "None"
587
Used for: SMTP submission from mail apps (RFC 6409)
Security setting: STARTTLS
465
Used for: SMTP submission, encrypted from the first byte
Security setting: SSL/TLS
995
Used for: POP3, encrypted from the first byte
Security setting: SSL/TLS
25
Used for: Server-to-server delivery between mail systems
Security setting: Not for mail apps - often blocked on home and mobile networks

"SSL/TLS" means the connection is encrypted before anything is said ("implicit TLS"). "STARTTLS" means the app connects in plain text and immediately asks the server to switch to encryption. Both are secure as long as the app refuses to continue without encryption, which is why you should never pick "None". RFC 8314 recommends implicit TLS where a provider offers it, but submission on 587 with STARTTLS remains the most widely supported choice and is what AnyMail uses.

The most common mistake is mixing the two: SSL/TLS on port 587 or STARTTLS on port 993. The app then waits for a handshake that never comes and reports a vague timeout or "cannot connect to server". If you see that, check the security setting against the port first.

Why app passwords

An app password is a separate, randomly generated password that only works for mail apps. It is safer than reusing the password of your web account: it never opens the web dashboard, it can't change settings, and if a phone is lost you revoke that one password without touching any other device. Many providers require them as soon as two-factor authentication is on, because a desktop mail app can't show a 2FA prompt.

In AnyMail, mail apps only accept app passwords:

  1. Open the mail server in the dashboard and find the inbox in its inbox list.
  2. Click Mail app on that inbox's row. The panel shows the IMAP and SMTP settings and your username.
  3. Give the password a label you'll recognise later ("Anna's iPhone") and click Create password.
  4. Copy the password straight into your mail app - it is shown once and can't be displayed again.

One password covers both IMAP and SMTP for that inbox, and reaches that inbox only - a password for anna@example.com can't read or send as sales@example.com. An inbox can have up to five active app passwords, so give every device its own. Revoking one in the same panel takes effect immediately: open IMAP connections using it are closed.

Step by step in each app

Menus change between versions, so the labels below are the current ones at the time of writing. If yours differ slightly, look for the nearest equivalent - the settings themselves don't change. In every app, let automatic setup try first; if it fails or picks the wrong server, switch to manual setup and use the values from the table above.

Thunderbird (Windows, macOS, Linux)

  1. Open Account Settings, click Account Actions at the bottom of the left pane and choose Add Mail Account (on first start Thunderbird opens this screen by itself).
  2. Enter your name, full email address and the app password.
  3. If Thunderbird can't find the settings or proposes a server like mail.example.com, choose to configure it manually.
  4. Incoming: IMAP, anymail.tech, port 993, SSL/TLS, Normal password. Outgoing: SMTP, anymail.tech, port 587, STARTTLS, Normal password. Username on both: your full address.
  5. Use Re-test to check the settings, then finish. Thunderbird stores outgoing servers separately from accounts, so you can later check or change it under the outgoing server (SMTP) section of Account Settings.

Outlook for Windows (classic)

  1. Choose File → Add Account.
  2. Enter your email address, open Advanced options, tick Let me set up my account manually and select Connect.
  3. Pick IMAP as the account type and fill in the incoming and outgoing server, port and encryption method on the account settings screen. Then enter the app password and connect.
  4. Leave Require logon using Secure Password Authentication (SPA) unchecked. SPA is a Microsoft mechanism that other mail servers don't use, and with it on, Outlook may never even ask for your password.

In the new Outlook for Windows, open the settings (View → View settings), go to Accounts → Your accounts and select Add Account under Email accounts. Enter your address and continue; when Outlook doesn't recognise the provider, choose IMAP and expand the advanced fields to enter the servers, ports and security settings yourself.

Apple Mail on a Mac

  1. Choose Mail → Add Account, select Other Mail Account at the bottom of the list and continue.
  2. Enter your name, full address and the app password.
  3. If Mail can't verify the account automatically, it asks for the account type and servers: choose IMAP and enter anymail.tech as both the incoming and the outgoing server, with your full address as the username on both.
  4. If sending fails later, check the outgoing server's port (587) and TLS setting in the account's server settings under Mail → Settings → Accounts.

iPhone and iPad (Mail app)

  1. Go to Settings → Apps → Mail → Mail Accounts → Add Account. Older iOS versions keep accounts under Settings → Mail → Accounts instead.
  2. Enter your address, tap Next, then tap Add Other Account and Mail Account. Enter your name, address, the app password and a description.
  3. If the settings can't be found automatically, choose IMAP and fill in both the Incoming Mail Server and the Outgoing Mail Server: host name anymail.tech, your full address as the user name and the app password. The outgoing user name and password are not optional, even though the screen may say so.
  4. Tap Next, then Save.

Android (Gmail app)

  1. Open the Gmail app, tap your profile picture at the top right and choose Add another account, then Other.
  2. Enter your full address, tap Next and choose Personal (IMAP). Enter the app password.
  3. Incoming server settings: username = your full address, server anymail.tech, port 993, security type SSL/TLS. Outgoing server settings: keep sign-in required, the same username and password, server anymail.tech, port 587, security type STARTTLS.
  4. Choose how often to sync, name the account and finish.

Phone makers' own mail apps (Samsung Email, for instance) ask for exactly the same fields, just in a different order.

What to expect from an AnyMail inbox in a mail app

Most of this is standard IMAP behaviour, but a few things are specific to how AnyMail works, and knowing them saves a support ticket:

  • Your own folders work too. Inbox, Sent, Drafts, Trash and Junk are always there, and folders you create, rename or nest in the app (an "Archive" folder, say) appear in the web app and vice versa. The built-in folders can't be renamed, deleted or given subfolders, and deleting one of your folders moves its mail to Trash instead of erasing it - empty Trash if you really want it gone.
  • Everything stays in sync. Reading a message in the app marks it read in the web app and vice versa. Deleting from Inbox moves the message to Trash, which is emptied automatically after the retention period. New mail is pushed to apps that keep an IMAP IDLE connection open.
  • Sent copies are saved for you. AnyMail files a copy of every message you send into Sent. If your app also saves one there, AnyMail recognises the duplicate, so you can leave that option on.
  • Up to 50 recipients per message. To, Cc and Bcc all work as usual - up to 50 addresses in total. Bcc recipients get the message without appearing in anyone's copy. With more than 50, the outgoing server asks your app to send the rest separately, which most apps do automatically.
  • You send as the inbox's own address. The app password for anna@example.com can only send as anna@example.com; a different "From" identity is rejected.

Troubleshooting

Certificate warnings

A warning such as "the certificate is not valid for this server" almost always means the app connects to a name the certificate doesn't cover. Typical cause: automatic setup guessed mail.yourdomain.com or imap.yourdomain.com, which point somewhere else or have no certificate for mail at all. Change the server to the hostname your provider documents - anymail.tech for AnyMail - and the warning disappears. Don't accept a certificate exception permanently to "make it work": that is exactly the warning that protects your password from someone intercepting the connection on public Wi-Fi.

A warning that names the right hostname but says the certificate is expired or untrusted is different: check that your device's date and time are correct, and if they are, contact your provider.

Login failed / authentication failed

  • The username must be the full address, including the domain - not just "anna".
  • Use the app password, not the password you sign in to the website with. Paste it rather than typing it; a stray space at the end is enough to fail.
  • Check the password hasn't been revoked, and create a new one if you are unsure - they cost nothing.
  • After repeated failures, servers throttle logins from your address. AnyMail's IMAP server locks an address out for 15 minutes after 10 failed logins in 15 minutes, so stop retrying, fix the setting and wait.
  • In Outlook, make sure Secure Password Authentication (SPA) is off; in other apps, "Normal password" is the right choice over an encrypted connection.

Receiving works but sending doesn't

  • Outgoing authentication must be on, with the same username and app password. Some apps leave the outgoing login empty by default.
  • Port 587 with STARTTLS. A server reply such as 530 5.7.0 Must issue STARTTLS first means the app tried to sign in without encryption - set the security mode to STARTTLS.
  • 550 5.7.1 Not authorized to send as this address means the From address doesn't match the inbox the password belongs to; 452 4.5.3 Too many recipients means the message had more than 50 recipients.
  • Don't use port 25 from a laptop or phone. Many internet providers block it to stop infected computers sending spam, and it isn't meant for mail apps anyway.

Cannot connect at all

If neither server answers, test from another network (mobile data instead of office Wi-Fi): corporate and hotel networks sometimes block mail ports. From a computer you can check whether the port is reachable:

Check that the IMAP and SMTP ports answer

openssl s_client -connect anymail.tech:993 -quiet
openssl s_client -starttls smtp -connect anymail.tech:587 -quiet

A greeting line from the server (* OK for IMAP, 220 or 250 for SMTP) means the network path and certificate are fine and the problem is in the app's settings. Mail that sends fine but lands in the recipient's spam folder is a different problem - see why emails go to spam and, for the details, how to read email headers.

Let AnyMail handle these records for you

AnyMail generates the MX, SPF, DKIM and DMARC records for your domain, checks every one of them automatically and tells you exactly which record to fix - then hosts your inboxes, operated from the EU.