Skip to main content

What is STARTTLS? STARTTLS vs SSL/TLS and which port to use

Published on November 24, 2026 6 min read

STARTTLS upgrades a plain email connection to TLS. How it works, how it differs from implicit SSL/TLS, and whether to use port 465 or 587.

Two tubes run to a server rack: the top one is closed and locked from the start, while the bottom one shows an envelope up to an orange ring, where a woman turns a handwheel and the tube becomes solid.

STARTTLS is a command that upgrades a plain-text email connection to an encrypted TLS connection. Your mail app connects to the server, asks for encryption, and only signs in once the encrypted connection is in place. With SSL/TLS, also called implicit TLS, the connection is encrypted from the very first byte.

For email hosted with LJPc, that means you send through ljpc.email on port 465 with SSL/TLS or on port 587 with STARTTLS. Fetching mail uses SSL/TLS: port 993 for IMAP and 995 for POP3. If you want to know what SMTP, IMAP and POP3 each do, see IMAP vs POP3 vs SMTP.

How does STARTTLS work?

STARTTLS for sending mail is defined in RFC 3207 from 2002. When you send a message on port 587, the conversation between your mail app and the server goes like this:

  1. Your mail app connects and the server greets it, still unencrypted.
  2. Your mail app sends EHLO and the server replies with a list of what it supports. If STARTTLS is on that list, the connection can continue encrypted.
  3. Your mail app sends STARTTLS, the server says it is ready, and the two set up a TLS connection. Your mail app checks the server's certificate along the way.
  4. The session starts over, now encrypted. Your mail app throws away everything it learned from the server in the plain-text part and sends EHLO again.
  5. Only then does it sign in with your email address and password and hand over your message.

IMAP and POP3 have the same upgrade step (in POP3 the command is called STLS). With LJPc you fetch mail over SSL/TLS on 993 or 995, so STARTTLS doesn't come into play there.

STARTTLS vs SSL/TLS: what's the difference?

Both encrypt the connection with TLS. The difference is when encryption starts, and that decides the port.

SSL/TLS (implicit TLS)STARTTLS
Encrypted fromThe first byte of the connectionThe STARTTLS command, after a short plain-text start
Port for sending465587
With LJPcSending on 465, fetching on 993 (IMAP) and 995 (POP3)Sending on 587
RFC 8314 (2018)Preferred for sending and fetchingStill allowed for sending while mail apps need it
What mail apps call itSSL/TLS, SSL, SMTPS, TLS on a dedicated portSTARTTLS, TLS, STARTTLS after connecting

Mail apps still say "SSL" because that was the protocol's original name. The last version, SSL 3.0, was formally retired in 2015 by RFC 7568. Pick SSL in your mail app and ljpc.email gives you TLS 1.2 or 1.3: our mail server refuses anything older.

Port 465 or 587: which one should you use?

Both work with LJPc, with ljpc.email as the outgoing server. If you have the choice, use 465 with SSL/TLS. The IETF has recommended implicit TLS since 2018 in RFC 8314, and 465 is the first option your mail app receives when it looks up our settings automatically, with 587 and STARTTLS as the second.

Use 587 with STARTTLS when your network blocks port 465, as guest networks and company firewalls sometimes do, or when your mail app works better with it. In Spark, for example, it helps when a message stays in the Outbox; see how to set up email in Spark.

Port and encryption go together: 465 with SSL/TLS, 587 with STARTTLS. STARTTLS on 465 or SSL/TLS on 587 ends in a timeout or a "cannot connect" error. Never set encryption to None, because your email address and password would then cross the network in readable form. Port 25 is for traffic between mail servers and doesn't belong in your mail app. All IMAP, POP3 and SMTP settings are listed in set up your email on your phone, tablet and computer.

What STARTTLS is called in your mail app

Every mail app has its own labels for the two options. Watch out for the word TLS on its own: in Samsung Email, WP Mail SMTP and FluentSMTP it means STARTTLS on port 587.

Mail appPort 465 (implicit TLS)Port 587 (STARTTLS)
OutlookSSL/TLSSTARTTLS
ThunderbirdSSL/TLSSTARTTLS
Apple Mail on MacUse TLS/SSL onUse TLS/SSL on
Samsung EmailSSLTLS
SparkSSLSTARTTLS
MailspringSSL / TLSSTARTTLS
EvolutionTLS on a dedicated portSTARTTLS after connecting
WP Mail SMTP and FluentSMTPSSLTLS
Post SMTPSMTPSSTARTTLS

STARTTLS between mail servers

Once you hit Send, your message travels from server to server until it reaches the recipient's mail server. That hop runs over port 25, and there STARTTLS is the only way to encrypt: no port has been agreed for implicit TLS between mail servers.

Between servers, STARTTLS is opportunistic. If the receiving server offers it, the sender encrypts; if not, the message usually goes on in plain text. Anyone who can tamper with the traffic between two servers can strip the STARTTLS announcement, so the sender never asks for encryption. RFC 3207 already warned about this.

DANE closes that gap. A TLSA record, protected by DNSSEC, states which certificate belongs to the mail server, and a sender that supports DANE will then only deliver over an encrypted connection with that certificate. See what is DANE for how it works. For domains without DNSSEC there is MTA-STS (RFC 8461), where the domain publishes over https that mail may only be delivered encrypted. The email test on internet.nl shows whether the mail servers for your own domain have STARTTLS and DANE set up correctly.

Is STARTTLS secure?

Yes, as long as your mail app insists on encryption. Set to STARTTLS, it only signs in once the TLS connection is up and the certificate checks out. The weak spot is the plain-text start, where a bug in the mail app or the server can be exploited. The study Why TLS is better without STARTTLS (USENIX Security 2021) reported more than 40 such issues, and only 3 of the 28 mail apps tested showed no STARTTLS-specific problem at all. The researchers' advice: use implicit TLS wherever you can.

So keep your mail app up to date and choose SSL/TLS on 465, 993 and 995 where you have the option.

How to test STARTTLS yourself

To see whether a server offers STARTTLS and which certificate it presents, run OpenSSL in a terminal, for example on a Mac or on Linux:

openssl s_client -starttls smtp -connect ljpc.email:587

You'll see the certificate chain, the TLS version and, near the end, the certificate check. Verify return code: 0 (ok) means the certificate is valid. For port 465, leave out -starttls smtp. Type QUIT to close the connection.

openssl s_client -connect ljpc.email:465

What LJPc takes care of

Your mail app talks to ljpc.email, which has a valid Let's Encrypt certificate and only accepts TLS 1.2 and 1.3. For most domains on our hosting the automatic setup details are in place, so Outlook and Thunderbird usually find the right port and encryption by themselves. Mail from other servers to those domains usually arrives on mx1.ljpc.email and mx2.ljpc.email, which both offer STARTTLS and have TLSA records for DANE.

You create email addresses and change passwords yourself in the customer portal. If your mail app shows a connection or certificate error, look it up in email client errors.

Frequently asked questions

Is STARTTLS the same as TLS?

STARTTLS is the command that turns an existing plain-text connection into a TLS connection. The encryption itself is TLS, exactly as with SSL/TLS on port 465. The only difference is when encryption starts: after a short plain-text start with STARTTLS, straight away with SSL/TLS.

Is STARTTLS less secure than SSL/TLS?

The encryption is the same. The plain-text start does leave room for bugs in mail apps and servers, which is why RFC 8314 prefers implicit TLS. With an up-to-date mail app that requires STARTTLS, port 587 is a safe choice. If you can choose, go for port 465 with SSL/TLS.

What port does STARTTLS use?

For sending mail from your mail app, STARTTLS uses port 587. Between mail servers it runs on port 25. With LJPc you fetch mail over IMAP or POP3 with SSL/TLS on port 993 or 995.

Why do I get a timeout when I choose STARTTLS?

Usually the port and the encryption don't match, for example STARTTLS on port 465. Use STARTTLS with port 587 and SSL/TLS with port 465. If that is set correctly, your network may be blocking the port, so try the other port or another network.

Does STARTTLS encrypt my email end to end?

No. STARTTLS encrypts the connection between two machines, such as your mail app and ljpc.email, or two mail servers. Each server along the way decrypts the message so it can deliver it. If only the recipient should be able to read it, you need to encrypt the message itself, for example with S/MIME or OpenPGP.

What does SSL mean in my mail app settings?

In most mail apps, SSL is the label for implicit TLS on port 465, 993 or 995. The old SSL protocol itself was retired in 2015. Our mail server ljpc.email only accepts TLS 1.2 and 1.3, even when your mail app says SSL.

Prefer to talk to someone?

We are also happy to answer your questions personally. Schedule a free consultation or call us directly. We are glad to think along with you.

Stay up to date with recent developments! Subscribe and receive our newsletter Signing up...