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
- Host name. Copy it again from the provider. Remove
https://, spaces, and trailing slashes. - Port and encryption. Port 587 pairs with TLS, port 465 with SSL. A mismatched pair often fails.
- Outbound firewall. Many hosts block ports 25, 465, and 587. Ask your hosting provider.
- Provider status. Check the provider's status page before you change settings.
- Local network. A local firewall, VPN, or security plugin can block outbound requests.
Common errors
| Error | Likely cause | What to try |
|---|---|---|
| Connection timed out | Port blocked or host unreachable | Try 587 with TLS, then 465 with SSL, then ask your host |
| Connection refused | Wrong port, or the server is not listening | Confirm the port from the provider |
| Could not resolve host | Host name typo or DNS problem | Copy the host again and check DNS |
| SSL certificate error | Encryption mismatch or an old server | Use the encryption pair from the provider |
| Connection reset | Firewall or provider rejecting the client | Check firewall rules and provider IP allowlists |
localhost connection failed | A local relay is expected but not running | Use 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_getorwp_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:
- SMTP authentication failed for login problems.
- Emails not sending for delivery problems.
- Emails going to spam for inbox delivery.
Next steps
- Read Provider error responses to decode a specific message.
- Review SMTP settings explained for the field values.
- Try a different provider card if the network path is blocked.