When I added a New User in Redash,
it didn’t send email form redash with Amazon SES.
Is there something missing in env?
Technical details:
Redash Version: 10.0.0.b50363
Browser/OS: Ubuntu 20.04.1 LTS
How did you install Redash:
# mkdir /opt/redash/
# cd /opt
# git clone https://github.com/getredash/setup.git
# cd setup
# sh setup.sh
. . .
# vim /opt/redash/docker-compose.yml
change :
--------------------------------------------------
image: redash/redash:10.0.0.b50363
--------------------------------------------------
# vim /opt/redash/env
add :
--------------------------------------------------
REDASH_MAIL_SERVER=email-smtp.xxxxxxxxxxxxxx
REDASH_MAIL_PORT=25 (or 465, 587)
REDASH_MAIL_USE_TLS=false (or true)
REDASH_MAIL_USE_SSL=false (or ture)
REDASH_MAIL_USERNAME=xxxxxxxxxxx (AWS creds smtp username)
REDASH_MAIL_PASSWORD=xxxxxxxxxxx (AWS creds smtp password)
REDASH_MAIL_DEFAULT_SENDER=myname1@mydomain1
--------------------------------------------------
# cd /opt/redash
# docker-compose down && docker-compose up -d
Amazon SES
Verify a New Email Address > Verified
Send a Test Email
--------------------------------------------------
From : myname1@mydomain1
To : myname1@mydomain1
--------------------------------------------------
> OK (sent)
I am encountering this as well. Running manage.py send_test_email works, but sending an email from UI fails. An error message can be obtained with manage.py users invite $email_to_invite $username $send_from_email, which will return:
RuntimeError: Application was not able to create a URL adapter for request independent URL generation. You might be able to fix this by setting the SERVER_NAME config variable.
I successfully configured Amazon SES with an V8 AMI that I upgraded to V10 in EC2. It didn’t require anything fancy. Here were my settings in /opt/redash/env
I did not test the CLI functions. I just reproduced that users would receive invitations triggered in the web app, reset password emails went normally, and alerts worked as expected.
This resulted in the same error when inviting a user:
File "/usr/local/lib/python3.7/site-packages/flask/helpers.py", line 333, in url_for
"Application was not able to create a URL adapter for request"
RuntimeError: Application was not able to create a URL adapter for request independent URL generation. You might be able to fix this by setting the SERVER_NAME config variable.
Unlike using port 587 and TLS, send-test-email also returns an error:
File "/app/redash/cli/__init__.py", line 73, in send_test_mail
subject="Test Message from Redash", recipients=[email], body="Test message."
File "/usr/local/lib/python3.7/site-packages/flask_mail.py", line 491, in send
with self.connect() as connection:
File "/usr/local/lib/python3.7/site-packages/flask_mail.py", line 144, in __enter__
self.host = self.configure_host()
File "/usr/local/lib/python3.7/site-packages/flask_mail.py", line 163, in configure_host
host.starttls()
File "/usr/local/lib/python3.7/smtplib.py", line 757, in starttls
"STARTTLS extension not supported by server.")
smtplib.SMTPNotSupportedError: STARTTLS extension not supported by server.