A Detailed Guide to SMTP Port 587
Written by
Dibya Sahoo

Subscribe for updates

A Detailed Guide to SMTP Port 587

Published : November 21, 2019

In 1998, RFC2476was submitted in order to add a new port for internet email communication. The concept of splitting the traditional message submission and message relay was proposed by the RFC. Thus port 587 was assigned to message submission to make sure that the new policy and security requirements don’t interfere with the traditional relay traffic over message relay port 25.

Technically both the ports are same and capable enough to support all sorts of SMTP related data transmission. It’s the addon security layer which makes port 587 as the preferred port for the new generation applications.

It is the one recommended for mail submissions instead of port 25 as per RFC 2476. But even if the mail server supports it, it may or may not be open for mail submissions. For that, you need to check with your administrator or with your hosting service provider.

Coupled with TLS encryption, port 587 will ensure that the email is submitted securely and following the guidelines set out by the IETF.

How to Check if Port 587 is blocked on your network?

There are some common error messages which you might encounter;

  • 2014-08-31 17:13:00 SMTP ERROR: Failed to connect to server: Permission denied (13)
  • Connection unexpectedly closed: timed out
  • Timeout::Error (execution expired)
  • S: SMTP ERROR: QUIT command failed: Connection: closed
  • SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
  • Mailer Error: SMTP connect() failed.

SMTP -> ERROR: Failed to connect to server: Connection timed out (110)


    • Command Shell- Windows
    • Console Terminal- Linux
    • MacOS Terminal

Step 1:


    • Press the Windows key together with the R key
    • After you do this a new Run window will open up
    • Type cmd in the run window and click OK
    • Now you should see a black command shell window


    •  Press the CTRL + ALT + T keys together
    • Then the black terminal window will show up


    •  Press the F4 key in order to get the MacOS launchpad
    •  In Launchpad’s search field type terminal and press ENTER

Step 2: Use telnet command to check if port is open

Type the following command:

telnet example.com 587


    1. Trying
      Connected to example.com.
      Escape character is '^]'.
      220 cl34.gs01.gridserver.com ESMTP Exim 4.63 Tue, 24 Jun 2008 13:45:04 -0700
    2. If you see Unable to connect or Connection refused, then the port is blocked. In this case, it is recommended to try turning off firewall or contact your ISP.
      telnet: connect to address Connection refused
      telnet: Unable to connect to remote host

There is one more tool outPorts on Github, which is very user-friendly when it comes to checking the outbound ports. But, yes it has multiple dependencies which need to be installed to start using.

Once, installed just run the below command to check if the port is opened or closed:

outPorts 587

Port 587Port 25
This port, coupled with TLS encryption, will ensure that email is submitted securely and following the guidelines set out by the IETF.SMTP was designated to use port 25 in IETF Request For Comments (RFC) 821. Today, the Internet Assigned Numbers Authority (IANA), the group responsible for maintaining the Internet addressing scheme, still recognizes Port 25 as the standard, default SMTP port. But in practicality, it’s not as simple as it seems.
When a mail client or server is submitting an email to be routed by a proper mail server, it should always use this port.This port is used primarily for SMTP relaying. SMTP relaying is the transmittal of email from email server to email server.

To summarize,

I hope this information was helpful to make the right decision on the SMTP port.

SMTP port 587 is one of the best choices for nearly every use case for connecting to email netcore. If you want to configure Pepipost for your SMTP relay and email delivery head over to our website for the best prices.

Unlock unmatched customer experiences,
get started now
Let us show you what's possible with Netcore.
Written By: Dibya Sahoo