Free tool

SMTP test tool

Type your SMTP server's name and this SMTP tester connects to ports 465, 587 and 2525 the way a mail app does: it reads the greeting, switches on encryption and lists the login methods the server offers. No password and no test email, so nothing secret leaves your hands.

Short answer: To test an SMTP server, connect to its sending port and read what it answers. A working server greets you with code 220, then either encrypts from the first byte (port 465) or offers STARTTLS (port 587) and lists its login methods. Of 19 popular SMTP servers we tested, all 19 answered on 587, 15 on 465 and 7 on 2525.

Test your SMTP server

Type the host name from your provider's settings, such as smtp.gmail.com, and press the button. Add a port (smtp.example.com:587) to test just that one. The report shows each port, what went wrong if it failed, the settings to put in your app, and a command to check your login on your own computer.

No password, no test email. We stop before the login step.

What the test checks

Everything a mail server tells a client before the login step, on each port:

  • Does the port answer: a greeting that starts with 220, the time it took, or the exact refusal, such as a 5xx greeting from a server that blocks a network.
  • Which encryption it wants: SSL/TLS from the first byte or STARTTLS after the greeting. When the usual start gets silence, we try the other one, so a port that needs the opposite setting is named as a mismatch, not reported as dead.
  • The certificate: our TLS connection only completes when the certificate is valid for the name you typed. We checked this on Gmail: connecting by its IP address instead of its name fails the handshake.
  • Login methods: what the server lists after encryption (PLAIN, LOGIN, XOAUTH2 and others), and anything it offers before encryption.
  • Size limit: the largest message the server says it accepts.
  • The whole conversation: every line we sent and received.

The test never sends a login, a sender, a recipient or a message. A password would only tell you one more thing, whether that password is right, and your app's own error already tells you that. To check it anyway, the report gives you a curl command to run on your own computer.

Port 465 or 587, and which encryption to choose

Use 587 with STARTTLS or 465 with SSL/TLS; both are encrypted, and RFC 8314 says there is “no significant difference” in security when both sides require TLS. What breaks is mixing them: each port expects one start, and apps name the two starts differently.

Setting names read in each project's documentation or source, 22 November 2026
Where you set itPort 465Port 587 (and 2525)
Most mail appsSSL/TLSSTARTTLS
WP Mail SMTP (WordPress)SSLTLS
PHPMailerENCRYPTION_SMTPS (“ssl”)ENCRYPTION_STARTTLS (“tls”)
Nodemailersecure: truesecure: false
curlsmtps://host:465smtp://host:587 --ssl-reqd

So “TLS” in WordPress and PHPMailer means STARTTLS on 587. The wrong choice looks like this. STARTTLS or None on port 465: the server waits for encryption and says nothing, so the app hangs until its timeout; all 15 servers in our test that use 465 stayed silent. SSL/TLS on port 587: it fails at once with [SSL: WRONG_VERSION_NUMBER] wrong version number, the error Python and OpenSSL gave us against Gmail and Microsoft.

What 19 SMTP servers answered

Port 587 with STARTTLS is the one setting that worked everywhere. We ran this tool's own test from Cloudflare's network against 19 public SMTP hosts on 22 November 2026:

19 SMTP hosts, 22 November 2026. – means no answer in 6 seconds. * offers login before encryption. Size in MB as the server states it
ProviderHost4655872525Login methodsMax size
Gmailsmtp.gmail.comSSLSTARTTLS–LOGIN PLAIN XOAUTH2 OAUTHBEARER …35
Microsoft 365smtp.office365.com–STARTTLS–LOGIN XOAUTH2150
Outlook.comsmtp-mail.outlook.com–STARTTLS–LOGIN XOAUTH2150
Yahoosmtp.mail.yahoo.comSSLSTARTTLS–PLAIN LOGIN XOAUTH2 OAUTHBEARER41
AOLsmtp.aol.comSSLSTARTTLS–PLAIN LOGIN XOAUTH2 OAUTHBEARER41
iCloudsmtp.mail.me.com–STARTTLS–LOGIN PLAIN XOAUTH2 and Apple tokens28
Zohosmtp.zoho.comSSLSTARTTLS–LOGIN PLAIN32
Fastmailsmtp.fastmail.comSSLSTARTTLS–PLAIN LOGIN XOAUTH2 OAUTHBEARER71
GMXmail.gmx.comSSLSTARTTLS–PLAIN LOGIN141
SendGridsmtp.sendgrid.netSSLSTARTTLS*STARTTLS*PLAIN LOGIN31
Brevosmtp-relay.brevo.comSSLSTARTTLS*STARTTLS*PLAIN LOGIN CRAM-MD520
Mailgunsmtp.mailgun.orgSSLSTARTTLS*STARTTLS*PLAIN LOGIN52
Postmarksmtp.postmarkapp.com–STARTTLS*STARTTLS*PLAIN LOGIN CRAM-MD5 DIGEST-MD520
Amazon SES (us-east-1)email-smtp.us-east-1.amazonaws.comSSLSTARTTLS*–PLAIN LOGINnot stated
Mailjetin-v3.mailjet.comSSLSTARTTLS*STARTTLS*PLAIN LOGIN DIGEST-MD5 CRAM-MD515
Resendsmtp.resend.comSSLSTARTTLS*–PLAIN LOGIN41
SMTP2GOmail.smtp2go.comSSLSTARTTLS*STARTTLS*SCRAM-SHA-256 SCRAM-SHA-1 CRAM-MD5 PLAIN LOGIN52
Mailtrap (sending)live.smtp.mailtrap.ioSSLSTARTTLSSTARTTLSLOGIN PLAIN31
UniOnesmtp.us1.unione.ioSSLSTARTTLS–LOGIN PLAIN10

Port 465 answered on 15 of 19; Microsoft (both hosts), iCloud and Postmark don't use it. Port 2525 answered on 7, all of them sending services; no mailbox provider listens there, so it only helps when a network blocks 587. Microsoft lists only LOGIN and XOAUTH2, so an app that insists on PLAIN can't log in there.

The starred rows are the finding to act on. All 9 mailbox providers offer login only after STARTTLS, but 8 of the 10 sending services also offer it before. We sent each of those 8 a made-up user and password before encryption: 6 checked it and answered 535, “authentication failed”, while Amazon SES and Resend refused with “Must issue a STARTTLS command first”. So with those six, an app set to “None” logs in over an unencrypted connection, and PLAIN and LOGIN send the password only base64-encoded, which is not encryption. The report flags this, and the fix is one setting: STARTTLS.

Why port 25 can't be tested here

Because this test runs on Cloudflare, and Cloudflare Workers can't open port 25: its TCP sockets documentation lists “Connections to port 25 are prohibited”, and that is the error we got. Google Cloud does the same; its mail guide says connections to TCP port 25 are blocked when the destination is outside your network, “due to the risk of abuse”. Port 25 carries mail from server to server, to the MX records of the receiving domain. An app, a printer or a website form submits mail on 587 or 465 with a login, and that's what this test checks.

The server answers, but the login fails

Then the server is fine and the credentials or the account settings are not. The report gives you a curl command that logs in and sends one test message to your own address; for Gmail on 587 it looks like this, and curl asks for the password when you run it:

printf 'From: you@gmail.com\r\nTo: you@gmail.com\r\nSubject: SMTP test\r\n\r\nIt works.\r\n' > smtp-test.txt
curl --url "smtp://smtp.gmail.com:587" --ssl-reqd --user "you@gmail.com" --mail-from "you@gmail.com" --mail-rcpt "you@gmail.com" --upload-file smtp-test.txt

Add -v to see the whole conversation. With a wrong password Gmail answers 535-5.7.8 Username and Password not accepted and curl prints curl: (67) Login denied. The usual causes:

  • Gmail: your normal password won't work in most apps. Google's page on app passwords says an app password is a 16-digit passcode, works only with 2-Step Verification on, and is revoked when you change your Google password.
  • Microsoft 365: SMTP AUTH can be switched off for the whole organisation or for one mailbox. Microsoft's documentation adds that when the authentication policy disables basic authentication for SMTP, clients can't use SMTP AUTH even with the setting on.
  • “530 Must issue a STARTTLS command first”: the app is set to no encryption. Choose STARTTLS for 587.
  • A 5xx greeting such as “552 Your IP Address is blocked from further use.”: Zoho answered one of our two test networks with exactly this and accepted the other. The block is on the network, not on your settings.
  • The login works but the mail never arrives: send the test message to a one-time address from our email spam checker instead of your own. Its report shows whether SPF, DKIM and DMARC pass for mail sent through this server, which is what receivers check next.

If the goal is a website form that emails you, SMTP isn't required at all. Formgong receives the form and sends each submission to your inbox from its own authenticated domain, with no SMTP host, port or password on your site.

Questions

How do I test my SMTP server?

Connect to its sending port and read the answer. Type the server's name into the free test on this page: it connects to 465, 587 and 2525, checks the greeting, the encryption and the certificate, and lists the login methods. To check the password too, run the curl command from the report on your own computer.

Is it safe to enter my SMTP password in an online tester?

This tester never asks for it. A connection test needs only the host name. A tool that logs in or sends a test email for you has to receive your password to do it. The curl command in our report checks the login from your own computer, and curl prompts for the password there.

Should I use port 465 or 587?

Either, as long as the encryption setting matches: SSL/TLS on 465, STARTTLS on 587. Port 587 answered on all 19 servers we tested and 465 on 15; Microsoft 365, Outlook.com, iCloud and Postmark don't use 465.

Why can't I connect to SMTP port 25?

Port 25 is for server-to-server delivery, and many networks block it for outgoing connections: Google Cloud blocks it to outside addresses, and Cloudflare Workers can't open it at all. Apps and websites send on 587 or 465 with a login.

What does “wrong version number” mean in SMTP?

Your app started SSL/TLS on a port that expects STARTTLS, usually 587. The server greets in plain text, the TLS library reads that greeting as a broken handshake and reports “wrong version number”. Choose STARTTLS for port 587, or use port 465 with SSL/TLS.

Sources

Checked on 22.11.2026 against these public pages: Cloudflare Workers: TCP sockets, RFC 8314, section 3.3: Implicit TLS for SMTP Submission, Microsoft Learn: Enable or disable SMTP AUTH in Exchange Online, Google Account Help: Sign in with app passwords, Google Cloud: Sending email from an instance, curl man page.

← Formgong