SMTP test

Short answer

How do I test an SMTP server?

You test an SMTP server by connecting to the port, reading the banner, sending EHLO and checking that the encryption works. Enter the host name, for example smtp.office365.com, and we test port 465 with TLS and port 587 with STARTTLS, and show the certificate, TLS version and the capabilities the server offers, without signing in.

Enter the host name of the SMTP server, for example smtp.company.com.

Port 25 is not tested

Azure, where the service runs, blocks outbound port 25 to prevent spam. We therefore only test the submission ports 465 and 587, which are used when email programs and printers send.

What we do

We connect, read the banner, send EHLO and STARTTLS, and end with QUIT. We never sign in and never send email.

How to read the result

  • The banner is the first line the server sends, and starts with 220. It often shows the name of the server.
  • The EHLO capabilities show what the server can do, such as STARTTLS, AUTH, SIZE and 8BITMIME.
  • AUTH is often only shown after STARTTLS, so that passwords are never sent unencrypted.
  • The certificate must be valid and have the same name as the host, or many email programs refuse to connect.

465 or 587?

Port 465 uses TLS from the first byte, and RFC 8314 recommends it for submission. Port 587 starts unencrypted and switches to TLS with STARTTLS. Both are safe when encryption is required. Port 25 is for traffic between mail servers and should not be used by printers or programs.

Questions and answers

Which port should the printer use?

587 with STARTTLS or 465 with TLS. Both require signing in at most providers.

Why can I not reach the server?

The host name can be wrong, or the server only answers on one of the ports. Some servers also only allow connections from certain networks.

What is the SMTP server for Microsoft 365 and Gmail?

Microsoft 365 uses smtp.office365.com on port 587. Google uses smtp.gmail.com on port 465 or 587.