knadh / listmonk

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.
https://listmonk.app
GNU Affero General Public License v3.0
14.73k stars 1.35k forks source link

Unable to send mails via SMTP Gmail #893

Closed RitvikSardana closed 2 years ago

RitvikSardana commented 2 years ago

I am getting this error when I try to send a mail to a user using the test mail: error sending message in campaign Test campaign: subscriber XXXXXX : tls: first record does not look like a TLS handshake

and this error when I make my own campaign: error sending message 'Finished: Ritvik Sardana': tls: first record does not look like a TLS handshake

error sending message in campaign Test campaign: subscriber ad7a4a38-01ea-4bb3-96ac-ee87bb416136: tls: first record does not look like a TLS handshake.

This is my SMTP Settings image

knadh commented 2 years ago

Please try port 465 for Gmail. I can see that you're not using the latest version of listmonk (v2.2.0), which has one-click configuration for Gmail.

RitvikSardana commented 2 years ago

image

After upgrading it to new version and using port 465 I am getting this error

P.S - My credentials are correct

knadh commented 2 years ago

Follow the link in the error message to find out more? :)

RitvikSardana commented 2 years ago

Yeah I did, still it shows the same error!!!

knadh commented 2 years ago

Gmail is complaining that you aren't supposed to use your account username and password to login to the SMTP. You've to generate an "app password". https://support.google.com/accounts/answer/185833?hl=en