STARTTLS is the mechanism that upgrades a plain-text SMTP connection to an encrypted one, but when it fails, you'll typically see an error along the lines of "Authentication failure: STARTTLS failed." This kind of error can be frustrating because it happens before your actual login credentials are even checked — something is going wrong at the encryption negotiation step itself.
How STARTTLS is supposed to work
- Your email client connects to the SMTP server over a plain, unencrypted connection.
- The client sends the STARTTLS command, requesting an upgrade to encryption.
- If the server supports TLS, the connection is upgraded and a secure channel is established.
- The rest of the session, including authentication and the message itself, travels encrypted.
Common causes of STARTTLS failures
Certificate mismatches
- The mail server's TLS certificate doesn't match the domain name being connected to.
- The certificate has expired or is self-signed and untrusted.
- The Common Name or Subject Alternative Name on the certificate is misconfigured.
Configuration errors
- The client is set to force SSL instead of STARTTLS, or vice versa.
- The server isn't properly configured to advertise or support STARTTLS at all.
Port restrictions
- Port 25 is frequently blocked by ISPs to reduce spam relay and isn't intended for client submission anyway.
- Port 587 is the recommended port for STARTTLS-based submission and should generally be open.
- Port 465, while technically associated with the older SMTPS method, is still used by some providers for direct TLS.
How to fix it
- Check your SMTP port: Confirm your client is set to port 587 with STARTTLS (or 465 with SSL/TLS, depending on what your provider specifies).
- Verify authentication settings: Make sure SMTP AUTH is enabled and your credentials are correct.
- Check firewall and network restrictions: Confirm your firewall isn't blocking outbound traffic on the required port, and that the server's IP isn't being filtered.
- Inspect the certificate: Make sure the certificate on your mail server matches the domain, hasn't expired, and is issued by a trusted certificate authority. Renew or reissue it if any of those checks fail.
- Confirm DNS records: Make sure MX, SPF, DKIM, and DMARC records are correctly set, since misconfigured DNS can contribute to broader connection issues.
Common questions
Is STARTTLS the same thing as SSL? Not exactly. STARTTLS is a command that upgrades an existing plain-text connection to TLS encryption, whereas SMTPS starts the connection already encrypted from the first byte.
Why does this error mention TLS but not my password? Because the failure happens during the encryption handshake, before your login credentials are ever checked.
Can a certificate that works fine in a browser still cause STARTTLS errors? Yes — mail clients and browsers validate certificates independently, and a mismatch specific to the mail server's hostname can cause STARTTLS to fail even if your website's certificate looks fine.