SMTP and Email Testing Explained | Mero Tool Blog
Email has become the backbone of business communication. Whether you’re sending invoices to clients or delivering newsletters to subscribers, your messages need to be delivered reliably and securely. Yet many non‑technical users have no idea how email actually travels across the internet, and even fewer know how to troubleshoot problems when an email fails to send. This guide demystifies the Simple Mail Transfer Protocol (SMTP), explains why testing your mail server is important and walks you through using our SMTP Test tool to verify your settings.
What is SMTP?
SMTP stands for Simple Mail Transfer Protocol. It is the standard set of rules that mail servers follow to send and receive messages over the internet. SMTP operates at the application layer of the TCP/IP stack and uses a reliable TCP connection to transport email data. Historically, it used port 25 to transfer messages【670022917869666†L27-L34】. Because port 25 is often blocked by consumer internet providers to reduce spam, alternative ports have been adopted: port 465 is used for SMTP over SSL/TLS (SMTPS) and is now the recommended default for secure connections, while port 587 uses STARTTLS to upgrade an unencrypted connection to TLS【251623159376181†L385-L394】. Another fallback, port 2525, is sometimes used when other ports are inaccessible【251623159376181†L385-L394】.
When you send an email, your email client (like Gmail or Outlook) connects to an SMTP server and hands over the message. That server then communicates with the recipient’s mail server via SMTP commands such as HELO, MAIL FROM, RCPT TO and DATA. Once the message is accepted, the recipient’s server stores it until the recipient fetches it through a retrieval protocol like POP3 or IMAP. Understanding this process empowers you to identify where failures occur: is the problem your internet connection, the sending server or the recipient’s server?
Why test SMTP settings?
Misconfigured SMTP settings are a common source of delivery failures. You might have mistyped the server hostname, chosen the wrong port or neglected to enable TLS. Some small business owners use shared hosting plans with limited email capabilities, and they only discover problems when clients complain about missing messages. Regularly testing your SMTP configuration helps you:
- Verify connectivity. Ensure that your server responds on the correct port and accepts connections from your network.
- Confirm authentication. Many servers require username and password authentication before relaying messages. Testing shows whether your credentials are being accepted or rejected.
- Measure deliverability. Some providers filter or block emails from poorly configured servers. By sending a test email and checking if it arrives in your inbox, you can gauge whether your domain is being flagged as spam.
- Diagnose errors. If you receive a specific SMTP error code (like 550 or 554), you can troubleshoot the root cause—be it a blocked port, DNS misconfiguration or blacklisting.
Common SMTP ports and encryption
Choosing the right port and encryption method is crucial for secure email delivery. In the early days of the internet, email was sent in plain text over Port 25. Today, encryption is mandatory to protect sensitive information and prevent eavesdropping. Here are the common options:
- Port 25 (SMTP): The original port for unencrypted SMTP traffic. Most modern mail servers still use this for relaying mail between servers, but many ISPs block it for end-users to prevent spam botnets from sending mail directly from infected home computers.
- Port 465 (SMTPS): Originally assigned for SMTP over SSL, it was briefly deprecated but has recently been reinstated as the recommended port for implicit TLS. In this mode, the connection is encrypted before any SMTP commands are even sent.
- Port 587 (STARTTLS): The standard port for email submission by users. It uses 'explicit' encryption, meaning the connection starts as plain text and then 'upgrades' to an encrypted TLS connection using the
STARTTLScommand. - Port 2525: While not an official IANA standard, this port is widely supported by almost every email service provider. It is an excellent fallback if your ISP blocks port 587.
SSL vs. TLS vs. STARTTLS: What's the Difference?
There is often confusion between these terms. SSL (Secure Sockets Layer) is the older encryption protocol, now succeeded by TLS (Transport Layer Security). When people say 'SSL' today, they usually mean TLS. The real distinction lies in how the encryption is initiated:
- Implicit TLS (Port 465): The client and server establish a secure connection first, and then start the SMTP conversation. It is more secure because no data is sent in the clear.
- Explicit TLS/STARTTLS (Port 587): The connection starts unencrypted. The client asks the server if it supports encryption (via
EHLO), and if so, it sends theSTARTTLScommand to begin the encrypted handshake. If the server doesn't support it, the connection might fall back to plain text (unless configured otherwise), which is a security risk known as a 'downgrade attack'.
The Trinity of Email Authentication: SPF, DKIM, and DMARC
In the modern email landscape, simply having a working SMTP server is not enough. To ensure your emails don't end up in the junk folder, you must implement authentication protocols that prove you are who you say you are.
1. SPF (Sender Policy Framework)
SPF is a DNS record that lists exactly which IP addresses and domains are allowed to send email on behalf of your domain. When a mail server receives an email from you, it checks your DNS. If the sender's IP isn't on the list, the email is marked as suspicious.
2. DKIM (DomainKeys Identified Mail)
DKIM adds a digital signature to every email you send. This signature is linked to your domain and is verified using a public key stored in your DNS. It ensures that the content of the email hasn't been tampered with while in transit.
3. DMARC (Domain-based Message Authentication, Reporting, and Conformance)
DMARC ties SPF and DKIM together. It tells receiving servers what to do if an email fails SPF or DKIM checks (e.g., 'do nothing', 'quarantine it', or 'reject it entirely'). It also provides reporting so you can see who is trying to send unauthorized mail using your domain.
Using the Mero Tool SMTP Test
Our SMTP Test tool simplifies the process of testing your mail server. You don’t need to type commands or open a terminal: just fill in the form and click Send Test Email. Here’s how to use it:
- Enter the server hostname. This is usually
smtp.yourdomain.comor provided by your email hosting provider (likesmtp.gmail.comfor Google orsmtp.mail.yahoo.comfor Yahoo). - Select the port. Choose 465 if you want implicit TLS, 587 for STARTTLS, or 2525 as a fallback.
- Enter your email address and password. These credentials authenticate you with the SMTP server. Pro Tip: If you use Gmail or Outlook with Two-Factor Authentication, you cannot use your regular password. You must generate an 'App Password' from your account settings.
- Specify the recipient email. You can send a test message to yourself or a secondary account to verify deliverability.
- Write a brief message. Add a subject and a short body so you can recognise the email in your inbox.
- Click send. The tool will attempt to connect to the server, authenticate and send the message. You’ll see success or error messages in real time.
Manual SMTP Testing via Command Line
For the more technically inclined, you can test SMTP manually using telnet (for unencrypted connections) or openssl (for encrypted ones). This allows you to see the raw conversation between the client and server.
Testing Port 587 with OpenSSL
openssl s_client -starttls smtp -connect smtp.gmail.com:587
Once connected, you can type SMTP commands manually:
EHLO yourdomain.com
AUTH LOGIN
[Base64 Encoded Username]
[Base64 Encoded Password]
MAIL FROM:
RCPT TO:
DATA
Subject: Manual Test
This is a test message.
.
QUIT
This method is invaluable for seeing exactly where an authentication or handshake failure occurs.
Best practices for reliable email delivery
Testing your server is only one part of ensuring reliable email delivery. Follow these best practices to improve your chances that messages land in the inbox:
- Use authentication records. Set up SPF, DKIM and DMARC records in your DNS to prove that your domain is authorised to send emails. Many receiving servers check these records before accepting mail.
- Monitor IP reputation. If your sending IP address is blacklisted due to past spam, you may need to request removal from blacklists. Use tools like MXToolbox to check your reputation.
- Avoid bulk spamming. Sending unsolicited marketing emails can quickly get you flagged. Always follow local regulations and obtain consent from recipients.
- Secure your credentials. Enable two‑factor authentication when possible and never share SMTP usernames and passwords publicly.
- Regularly test your setup. Use our SMTP Test tool whenever you change hosts, update DNS records or experience delivery issues. Early detection prevents business‑critical messages from being lost.
Deep Dive into Troubleshooting SMTP Errors
When an email fails, the server returns a three-digit code. The first digit tells you the general status:
- 2xx: Success.
- 3xx: Further information is needed (usually after the
DATAcommand). - 4xx: Temporary failure (the server will usually try again later).
- 5xx: Permanent failure (the email will not be sent).
Common Error Codes and Solutions:
- 421: Service not available. The server is overloaded or undergoing maintenance. Solution: Wait and try again.
- 451: Requested action aborted. Often means your sending limit has been reached. Solution: Check with your provider about daily limits.
- 535: Authentication failed. The username or password is incorrect. Solution: Double-check credentials, and ensure you are using an App Password if 2FA is enabled.
- 550: Requested action not taken. The recipient mailbox is unavailable or doesn't exist. It can also mean your IP is blocked. Solution: Verify the recipient's address or check your IP reputation.
- 552: Exceeded storage allocation. The recipient's inbox is full. Solution: Contact the recipient through another channel and ask them to clear space.
- 554: Transaction failed. The message was rejected as spam. Solution: Check your content for 'spammy' keywords and ensure SPF/DKIM are set up correctly.
Conclusion
Email still reigns as the most trusted form of digital communication. By understanding how SMTP works, choosing the right ports and testing your setup regularly, you can avoid delivery nightmares and build trust with your recipients. Our SMTP Test tool removes the guesswork by providing instant feedback on connectivity, authentication and message delivery. Whether you are a freelancer sending invoices or a business owner running marketing campaigns, proactive testing will keep your emails flowing smoothly.
Sources and Further Reading:
- RFC 5321: Simple Mail Transfer Protocol (Official Standard)
- RFC 3207: SMTP Service Extension for Secure SMTP over TLS
- Google Workspace Admin Help: Outbound SMTP settings
- Microsoft Learn: SMTP authentication and ports
Comments (24)
This tool has been a lifesaver for our accounting department. We no longer have to manually convert dates for our reports. Thank you!
ReplyI use this for converting my children's birthdays from BS to AD so our international relatives can remember them. So convenient!
ReplyThank you for sharing your experience, Sita! We're glad our tool is helping families stay connected across different calendar systems.
ReplyLeave a Comment