What it's for
Port 465 is used for SMTP submission wrapped in implicit TLS from the start of the connection — commonly labeled SMTPS. It serves the same core purpose as port 587 (a mail client or application submitting outgoing mail to its outbound mail server), but skips the STARTTLS negotiation step in favor of encrypting the entire connection immediately.
Protocol basics
Port 465 had a confusing history — it was briefly deprecated in favor of STARTTLS-based submission on port 587, then effectively reinstated through widespread real-world use and eventual formal standardization (RFC 8314) as a legitimate, explicitly recommended implicit-TLS option. Functionally, once the TLS handshake completes, the SMTP conversation itself (authentication, sender/recipient, message body) is identical to what happens on port 587 — the practical difference is purely in when encryption is established.