Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get TLS for gmail to work?? #83

Open
jsa-aerial opened this issue Jan 26, 2017 · 4 comments
Open

How to get TLS for gmail to work?? #83

jsa-aerial opened this issue Jan 26, 2017 · 4 comments

Comments

@jsa-aerial
Copy link

I see in the README that STARTTLS and TLS is supposed to be supported. I read issue #7 and the old pull #11 that looked to solve this. But I cannot get gmail to accept this using any 'obvious' combination of parameters in the arguments map. In particular, using just :port 587 results in

SMTPSendFailedException 530 5.7.0 Must issue a STARTTLS command first.

Using :tls true results in same error as using :ssl true or both :ssl true and :port 587 result in 'less secure app' error => google thinks tls is not being used.

Looking at support.clj, it looks like there is some way to enable this as there are indications that starttls.enable can be activated, but the how of doing this is totally opaque to me.

Any suggestions / answers?

Thanks

@drewr
Copy link
Owner

drewr commented Feb 3, 2017

You probably have two-factor auth enabled on your account. Can you try enabling app passwords in your Google account and create one for using Gmail through SMTP?

@jsa-aerial
Copy link
Author

Do not have two step verification on. The error does not involve passwords, it involves so called 'less secure apps', which are 'defined' as using 'less secure sign-in technology', which seems to mean - not using TLS. If you turn on/enable 'Allow less secure apps' using :ssl true, works. If this is off (disabled) you nothing seems to work, including :tls true and :port 465. When using :port 465 alone, the error says you need to issue STARTLS. You would think that enabling TLS would fix this, but assuming :tls true enables it, the error still talks about 'less secure app' not allowed.

@burhanloey
Copy link

Same happened to me when I was trying to use :tls, I just changed to :ssl however because according to here, Google use TLS even for SSL port. I guess that's fine.

@mrkam2
Copy link
Collaborator

mrkam2 commented Jun 7, 2021

These are the settings that worked for me but I also needed to enable access "for less secure apps":

{:host "smtp.gmail.com"
 :user (get-user)
 :pass (get-password)
 :ssl true}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants