SendMail: Failed to open TLS connection., tls: first record does not look like a TLS handshake

Summary
Cannot send mail through Mattermost, failed to open a TLS connection.

Steps to reproduce
Send a test email through the SMTP setting page.

Expected behavior
Receive an email when I send a test.

Observed behavior
I installed Mattermost using the Digital Ocean instruction guide. When I set up the SMTP settings and try to send a test email, I get an error message (Connection unsuccessful: Connection unsuccessful: SendMail: Failed to open TLS connection., tls: first record does not look like a TLS handshake).

I’ve tried a couple of different SMTPs including sendinblue and moosend. Both are functioning for RocketChat servers I have set up. I have seen a few other posts with this issue, and I have tried to resolve it without luck (I’ve changed the Notifications From and Reply to settings to the correct email address, I’ve also tried using TLS and STARTTLS).

Here is the error log:
{“level”:“error”,“ts”:1645648432.36797,“caller”:“mlog/log.go:175”,“msg”:“Connection unsuccessful: SendMail: Failed to open TLS connection., tls: first record does not look like a TLS handshake”,“path”:"/api/v4/email/test",“request_id”:“xxxxxxx”,“ip_addr”:"::1",“user_id”:“xxxxxxxx”,“method”:“POST”,“err_where”:“testEmail”,“http_code”:500,“err_details”:""}

1 Like