When I send an email, the following message appears:
failed: tls: first record does not look like a TLS handshake
When I send an email, the following message appears:
failed: tls: first record does not look like a TLS handshake
Error message tls: The first record does not look like a TLS handshake usually indicates that the client received an unexpected response when attempting to connect to the mail server via TLS. Specifically, the client attempted to establish a connection using TLS encryption, but the mail server did not respond correctly to the TLS handshake.
Possible reasons:
SMTP server not enabled TLS:
The email server may not have enabled TLS or may not support TLS handshake, causing clients to be unable to communicate over encrypted connections. You can confirm if TLS is supported by checking the configuration of the email service.
Port configuration error:
If you are using an incorrect port, the email client may attempt to connect using TLS, but the server may return a non TLS response. For example, SMTP typically uses port 25 without encryption, while ports 465 (SSL) or 587 (STARTTLS) typically use TLS encryption. Ensure that the client uses the correct port and encryption protocol.
Wrong server address:
It may be due to the incorrect email server address you are using, or the client attempting to connect to a server that does not support TLS. Ensure that the email server address is correct and consistent with the information provided by the email service provider.
Firewall or intermediate device interference:
Sometimes firewalls or other devices in the network may interrupt encrypted communication, resulting in the inability to establish TLS connections.