Skip to main content

Understanding Email Connection Errors

A connection error means LetterPress could not reach the provider. The message may be short, such as "Connection timed out" or "Could not connect to host". The cause is usually one of five things.

Check in this order​

  1. Host name. Copy it again from the provider. Remove https://, spaces, and trailing slashes.
  2. Port and encryption. Port 587 pairs with TLS, port 465 with SSL. A mismatched pair often fails.
  3. Outbound firewall. Many hosts block ports 25, 465, and 587. Ask your hosting provider.
  4. Provider status. Check the provider's status page before you change settings.
  5. Local network. A local firewall, VPN, or security plugin can block outbound requests.

Common errors​

ErrorLikely causeWhat to try
Connection timed outPort blocked or host unreachableTry 587 with TLS, then 465 with SSL, then ask your host
Connection refusedWrong port, or the server is not listeningConfirm the port from the provider
Could not resolve hostHost name typo or DNS problemCopy the host again and check DNS
SSL certificate errorEncryption mismatch or an old serverUse the encryption pair from the provider
Connection resetFirewall or provider rejecting the clientCheck firewall rules and provider IP allowlists
localhost connection failedA local relay is expected but not runningUse a real provider or start the relay

API providers​

API providers do not use SMTP ports. They connect over HTTPS on port 443. If an API test fails with a network error, check:

  • Whether the server can make outbound HTTPS requests.
  • Whether a security plugin blocks wp_remote_get or wp_remote_post.
  • Whether a proxy is required on the server.
  • Whether the API base URL was changed by a filter or a custom plugin.

Quick checks​

Ask your host or run these from the server if you have SSH access:

dig smtp.example.com
nc -vz smtp.example.com 587
curl -I https://api.example.com

Replace the host and port with your values. nc checks the port. curl checks HTTPS.

When the test passes but mail fails​

A connection test only proves the network path and the login. If it passes but a test email fails, move to:

Next steps​