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— Port993— EncryptionSSL/TLS - POP3 Incoming Server:
mail.example.com— Port995— EncryptionSSL/TLS - SMTP Outgoing Server:
mail.example.com— Port465(SSL) or587(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:
- From the File menu, select Add Account.
- Enter your email address and click Connect.
- If Outlook cannot automatically find the settings, select Advanced setup and then IMAP.
- 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
- Incoming mail server:
- Click More Settings, and in the Advanced tab, enter ports
993(IMAP) and465(SMTP). For SMTP, enable theSSLoption. - In the Outgoing Server tab, check My outgoing server (SMTP) requires authentication.
- 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:
- From the Tools menu, select Account Settings, then Account Actions, and click Add Mail Account.
- Enter your name, email address, and password. Thunderbird will automatically guess the server settings from its database.
- If the automatic guess is wrong, click Manual Config and enter the following values:
- IMAP:
mail.yourdomain.com— Port993— SSL/TLS - SMTP:
mail.yourdomain.com— Port465— SSL/TLS
- IMAP:
- 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)
- Open the Gmail app and tap your avatar in the top right corner.
- Select Add another account and then Other.
- Enter your email address and tap Manual setup.
- Choose IMAP and enter the server values. In the Security type section, select SSL/TLS.
- Repeat the same for SMTP and enter port
465with SSL.
iOS (Mail App)
- Go to Settings, then Mail, and then Accounts.
- Tap Add Account and then Other.
- Tap Add Mail Account and enter your information.
- 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:
993for IMAP,995for POP3, and465or587for 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.