Common SMTP Connection Errors
While our API is the recommended way to integrate with Postmark, many platforms, legacy systems, and plugins (like WordPress) rely on SMTP (Simple Mail Transfer Protocol). When your application fails to connect to our SMTP servers, the error messages can often be vague, such as "Connection Timed Out" or "Authentication Failed."
Most SMTP issues are caused by network restrictions or credential mismatches rather than a failure of the service itself.
Standard SMTP Settings
Before troubleshooting, ensure your application is using the correct configuration:
SMTP Server:
smtp.postmarkapp.comPorts: 25, 2525, or 587
Security: STARTTLS (preferred) or TLS/SSL
-
Authentication: * Username: Your Server API Token
Password: Your Server API Token (Yes, the token is used for both fields)
1. Connection Timed Out (Port 25 Issues)
This is the most frequent error encountered by developers. By default, many ISPs and cloud hosting providers (such as AWS EC2, DigitalOcean, and Google Cloud) block outbound traffic on Port 25 to prevent spam.
The fix: If you are seeing a timeout, switch your SMTP port to 2525 or 587. Postmark supports all three ports, and 2525 is specifically designed to bypass the common blocks placed on Port 25.
2. Authentication Failed (Incorrect Token)
If your connection is successful but the server rejects your login, double-check your credentials.
Server Token vs. Account Token: You must use a Server API Token for SMTP. An Account API Token (used for creating servers or managing users) will not work for sending mail.
Correct Server: Ensure the token belongs to the specific Server in Postmark where you want the emails to appear.
Copy/Paste Errors: Check for accidental spaces at the beginning or end of the token string.
3. SSL/TLS Handshake Failures
If you receive an error regarding certificates or an "SSL Handshake Failure," it usually means your application is trying to use an encryption method the server doesn't expect.
STARTTLS: Postmark supports STARTTLS on ports 25, 2525, and 587. This starts as a plain connection and "upgrades" to a secure one.
Implicit SSL: If your app specifically requires "SMTPS" or "Implicit SSL" (commonly on port 465), note that Postmark does not support port 465. Use Port 587 with STARTTLS instead.
Outdated Libraries: Ensure your server’s OpenSSL version is up to date. Older servers that don't support TLS 1.2 or higher may struggle to connect to modern secure endpoints.
4. "Sender Signature Not Found"
Even if your SMTP connection is perfect, Postmark will reject the message if the From address in your email doesn't match a verified Sender Signature or Domain in your account.
The fix: Check the From header in your application’s mail settings. It must exactly match an email address or domain that shows a green "Verified" status in your Postmark dashboard.
How to test your connection manually
If you want to rule out your application code, you can test the connection from your server's command line using telnet or openssl:
Testing Port 2525:
Bash
telnet smtp.postmarkapp.com 2525
If you see a response starting with 220, the port is open and the connection is working. If it says "Connecting..." indefinitely, the port is blocked by your firewall or ISP.
Testing with Encryption:
Bash
openssl s_client -starttls smtp -connect smtp.postmarkapp.com:587
For more details on SMTP integration and specific error codes, please visit our guide: https://postmarkapp.com/developer/user-guide/send-email-with-smtp