Port 587 is the standard port for authenticated email submission using STARTTLS. Email clients (Outlook, Gmail, Thunderbird) use port 587 to submit outgoing mail to their mail server. Unlike port 25, ISPs generally don't block port 587.
Port Number
587
Protocol
TCP
Service
SMTP with STARTTLS
Range
IANA Well-Known (0–1023)
Test STARTTLS negotiation and certificate validity on port 587
openssl s_client -connect mail.example.com:587 -starttls smtpSend authenticated test email via port 587
swaks --to [email protected] --server mail.example.com:587 --tls --auth-user user --auth-pass passBasic connectivity test – should see 220 banner
telnet mail.example.com 587EHLO client.example.com
STARTTLS
AUTH PLAIN <credentials>Port 587 for mail submission was defined in RFC 2476 (1998), updated by RFC 6409 (2011). It was created to separate authenticated client submission from unauthenticated server-to-server relay on port 25, enabling ISPs to block outbound 25 without breaking legitimate email sending.
Should I use port 587 or 465 for sending email?
Port 465 (implicit TLS) is now the IETF-recommended submission port (RFC 8314, 2018). Port 587 (STARTTLS) works but is vulnerable to downgrade attacks. Gmail, Outlook, and most providers support both. New configurations should prefer 465.
Why does my app fail to send email on port 587?
Common causes: firewall blocking outbound 587, STARTTLS certificate verification failure (self-signed cert), wrong credentials, or the server requires AUTH before MAIL FROM. Test with: openssl s_client -connect host:587 -starttls smtp.