Configuring email in Outlook, mobile and Thunderbird

Step-by-step tutorial for configuring email clients in Outlook, Android, iOS, and Thunderbird, focusing on the differences between IMAP and POP3, secure SSL/TLS ports, and troubleshooting common connection errors.

7 min Updated 12 Sep 2026

Why Does Proper Email Client Setup Matter?

Many users encounter errors like "Unable to connect to server" or "Incorrect username or password" when setting up an email client, even though their email works fine in webmail. The root of this issue usually lies in choosing the wrong protocol, using insecure ports, or incorrect incoming and outgoing server settings. In this guide, we'll walk through configuring email clients for the most popular applications — Outlook, Thunderbird, and mobile clients — with technical details and real-world examples so you can set up your email on any device without confusion.

IMAP vs. POP3: Which One Should You Choose?

The first and most important decision in email client setup is choosing between IMAP and POP3. These two protocols handle your messages very differently, and choosing incorrectly can lead to lost emails or inconsistency across devices.

IMAP: Two-Way Sync for Multiple Devices

IMAP (Internet Message Access Protocol) keeps emails on the server, and the client only creates a "cached view" of them. Any change (read, delete, move to folder) is applied on the server and then synced across all devices. If you work with your phone, laptop, and webmail, IMAP is the only logical choice. The default IMAP port with SSL/TLS encryption is port 993.

POP3: Download and Remove from Server

POP3 (Post Office Protocol) downloads emails from the server and (depending on settings) removes them from the server. This protocol is suitable for users who only use one device and want to keep server space free. The secure POP3 port with SSL/TLS is port 995. Note that if you set up POP3 with the "delete from server" option, your emails will no longer be visible on other devices.

Common Mistake: Many users choose POP3 and then wonder why old emails disappear from their phone. This is normal POP3 behavior, not a system error. If you need old emails, be sure to enable the "Keep a copy on the server" option.

Secure Ports and Server Settings: Exact Numbers

To configure an email client, you need four main parameters: incoming server, outgoing server, username, and password. In the table below, you'll find standard values for secure servers (with SSL/TLS encryption):

  • IMAP Incoming Server: mail.example.com — Port 993 — Encryption SSL/TLS
  • POP3 Incoming Server: mail.example.com — Port 995 — Encryption SSL/TLS
  • SMTP Outgoing Server: mail.example.com — Port 465 (SSL) or 587 (STARTTLS) — Authentication required

On most Iranian hosting providers, the server address is in the form of mail.yourdomain.com. The username is usually your full email address (e.g., info@yourdomain.com), not just the part before the @. If you use services like Gmail or Yahoo, the server addresses will be imap.gmail.com and smtp.gmail.com respectively.

Difference Between Port 465 and 587

Port 465 applies SSL encryption from the start and is designed for SMTP. Port 587 uses STARTTLS, which first establishes a plaintext connection and then upgrades it. Both are secure, but some corporate networks block port 465. If you encounter a "timeout" error, change the SMTP port to 587.

Setting Up Email Client in Microsoft Outlook (Desktop)

Outlook, as the most popular desktop client, has an automatic setup process, but sometimes you need to enter settings manually. The following steps are the same for Outlook 2016, 2019, and Microsoft 365:

  1. From the File menu, select Add Account.
  2. Enter your email address and click Connect.
  3. If Outlook cannot automatically find the settings, select Advanced setup and then IMAP.
  4. In the window that opens, enter the following values:
    • Incoming mail server: mail.yourdomain.com
    • Outgoing mail server (SMTP): mail.yourdomain.com
    • Username: Your full email address
  5. Click More Settings, and in the Advanced tab, enter ports 993 (IMAP) and 465 (SMTP). For SMTP, enable the SSL option.
  6. In the Outgoing Server tab, check My outgoing server (SMTP) requires authentication.
  7. Click OK and then Connect.

Common Error: If you receive the message "We couldn't log on to the incoming mail server," first make sure the username is exactly your full email address. Second, verify that the password works in webmail. Third, if you use two-factor authentication, you'll need to create a dedicated "App Password."

Setting Up Email Client in Thunderbird

Mozilla Thunderbird is a lightweight, open-source client with more transparent settings than Outlook. To configure it:

  1. From the Tools menu, select Account Settings, then Account Actions, and click Add Mail Account.
  2. Enter your name, email address, and password. Thunderbird will automatically guess the server settings from its database.
  3. If the automatic guess is wrong, click Manual Config and enter the following values:
    • IMAP: mail.yourdomain.com — Port 993 — SSL/TLS
    • SMTP: mail.yourdomain.com — Port 465 — SSL/TLS
  4. Click Re-test to check the connection. If everything is green, click Done.

To configure SMTP in Thunderbird, go to Account Settings, click on Outgoing Server (SMTP), and click Add. Here, you'll need to specify the server name, port, and authentication method (Normal password).

Setting Up Email Client on Mobile (Android and iOS)

Mobile clients usually have the simplest setup process, but precisely for that reason, users often accept incorrect default settings. On Android (Gmail app or Samsung Email) and iOS (Mail app), follow these steps:

Android (Gmail App)

  1. Open the Gmail app and tap your avatar in the top right corner.
  2. Select Add another account and then Other.
  3. Enter your email address and tap Manual setup.
  4. Choose IMAP and enter the server values. In the Security type section, select SSL/TLS.
  5. Repeat the same for SMTP and enter port 465 with SSL.

iOS (Mail App)

  1. Go to Settings, then Mail, and then Accounts.
  2. Tap Add Account and then Other.
  3. Tap Add Mail Account and enter your information.
  4. On the next screen, tap IMAP and enter the incoming and outgoing servers with secure ports.

Common Mistake on Mobile: Many users select "None" in the "Security type" section to establish a faster connection. This severely reduces the security of your email, and your password travels across the network in plaintext. Always choose SSL/TLS.

Common Connection Errors and Their Solutions

Even with correct settings, you may encounter errors. Here, we'll review the most common errors and their practical solutions:

"Connection timed out" Error

This error usually occurs because the port is blocked by a firewall or ISP. Solution: Change the SMTP port from 465 to 587. If the problem persists, test the connection to the server using telnet mail.yourdomain.com 993 from the command line. If telnet also fails to connect, the issue is on your network side.

"SSL certificate mismatch" Error

If the server's SSL certificate doesn't match the domain name, clients will show this error. First, make sure you're using the correct server address (e.g., mail.yourdomain.com). If the certificate genuinely has an issue, you'll need to ask your hosting team to fix it. Never enable the "Accept certificate" option without checking.

"Authentication failed" Error

This error has three main causes: incorrect password, incomplete username, or enabled two-factor authentication. If you use 2FA, you'll need to create a dedicated App Password. Also, make sure you've entered the username in full format (including @ and domain).

Summary and Final Recommendation

Setting up an email client isn't difficult once you know the basics. Here's a summary of key points:

  • For use on multiple devices, always choose IMAP.
  • Use secure ports: 993 for IMAP, 995 for POP3, and 465 or 587 for SMTP.
  • Enter the username in full (email address) format.
  • If you encounter a timeout error, change the SMTP port to 587.
  • For troubleshooting, first test the connection with telnet to ensure the problem isn't on the server side.

If you use ServerNet's email hosting service, all these settings can be applied with the standard values mentioned in this guide. If you encounter any unresolvable errors, our technical support team can provide you with the exact settings for your server.

Was this page helpful?