Trying to set up GMAIL email-server. Failing

Issue Summary

We’re trying to set up an email-server , using GMAIL.
(redash@ridewithvia.com)

We’ve tried all possible combinations of [tls, ssl, host, port ] , but not succeeding.
here are our attempts + responses :

attempt: (True, False, ‘smtp.gmail.com’, 587)
Response: smtplib.SMTPAuthenticationError: (535, '5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials h13sm3674963qtu.23 - gsmtp')

attempt: (True, False, ‘smtp.gmail.com’, 465)
response: smtplib.SMTPServerDisconnected: Connection unexpectedly closed

attempt: (False, False, ‘smtp.gmail.com’, 465)
response: smtplib.SMTPServerDisconnected: Connection unexpectedly closed

attempt: (True, True, ‘smtp.gmail.com’, 465)
response: smtplib.SMTPException: STARTTLS extension not supported by server.

attempt: (False, True, ‘smtp.gmail.com’, 465)
response: smtplib.SMTPAuthenticationError: (535, '5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials x4sm3491709qkx.33 - gsmtp')

attempt: (False, False, ‘smtp.gmail.com’, 587)
response: smtplib.SMTPException: SMTP AUTH extension not supported by server.

attempt: (False, True, ‘smtp.gmail.com’, 587)
response: ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:727)

attempt: (True, True, ‘smtp.gmail.com’, 587)
response: ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:727)

@arikfr would love your kind help:)

Technical details:

  • Redash Version: 8
  • Browser/OS:
  • How did you install Redash: Image

Can you confirm that you’re following the steps described here: https://redash.io/help/open-source/setup i.e. you’re editing the file /opt/redash/env and setting the appropriate environment variable values there?

I am having the same issue with all combinations mentioned above, same exact results. To confirm, I am in fact editing the /opt/redash/env file and doing a full container compose as suggested from Redash documentation, but this is still not working.

Perhaps have a look at the Docker help pages? Are you certain your environment var changes are being picked up by the containers?

I switched to SES and that’s working fine, seems to be a GMail issue.

1 Like

For anyone who comes back to this. I had this same issue. Removing REDASH_MAIL_USE_SSL entirely from the env file solved it for me. Having both the SSL and TLS I suppose throws it off entirely.

1 Like

I had same problem in Redash mail server setup with gmail. Going to [Sign in - Google Accounts] worked for me. It make my gmail account access enabled.

1 Like

For those who still have this problem, check followings.

(In V10, remove all " from values)

  • REDASH_MAIL_USE_SSL=false
  • REDASH_MAIL_USE_TLS=true
  • REDASH_HOST=http://~~~

(1) The google account in REDASH_MAIL_USERNAME should set to have 2-step verification.
(2) In addition, the account should have “App passwords” in order to log in from a certain application. (Sign in with App Passwords - Google Account Help)