If your emails aren't going out, the first thing to test is the SMTP connection itself. A 30-second check tells you whether the server is reachable, whether TLS is up, and whether your credentials work.
Quick test with telnet (port 587, no TLS)
- Open a terminal.
- Run:
telnet your-smtp-host 587 - You should see a
220greeting from the server. - Type
EHLO yourdomain.com— the server should reply with250capabilities. - Type
QUITto close.
Test TLS with openssl (port 587 + STARTTLS)
- Run:
openssl s_client -starttls smtp -crlf -connect your-smtp-host:587 - Check the certificate chain and verify return code
0 (ok). - Type
EHLO yourdomain.comto confirm authentication is offered.
Test full sending with swaks
Swaks is the fastest way to send a real test email:
swaks --to [email protected] --server smtp.host:587 --tls --auth LOGIN --auth-user you --auth-password ••••- Watch every step (greeting, EHLO, STARTTLS, AUTH, MAIL FROM, RCPT TO, DATA, .).
Common SMTP errors and what they mean
- 421 — service not available, often rate-limit or IP block.
- 535 — authentication failed, check user/password.
- 550 — mailbox unavailable, recipient rejected.
- Connection refused — firewall blocks the port or wrong host.
- TLS handshake failed — incompatible TLS version or expired certificate.
Skip the SMTP headaches — use Mailpro
Mailpro's SMTP relay handles TLS, authentication, deliverability and reputation for you. Free trial, no credit card. Try Mailpro SMTP free · Deliverability hub
Related reading: