Email sending settings using Amazon SES

Issue Summary

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)

Create My SMTP Credentials > OK (done)

Redash

Logged in Redash (http://192.168.x.x/login)
Settings > Users > +New User

Name : hoge
Email : myname1@mydomain1

Create > [(v) Saved.]

comment

I haven’t received the email. There are no particular error messages in Redash. Is there a log file somewhere?

I’m away from my workstation. But FYI The setup script has not been updated to for V10 yet. I don’t think that would be the issue but it’s possible.

Rather than editing the env file within the container, try making those changes in the setup script itself and re-running.

thank you.
I will try redash v8. and edit setup.sh.

Looking into this further I think there may be a compatibility issue specifically between Redash and SES. Investigating…

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.

However, setting SERVER_NAME or REDASH_SERVER_NAME does not have an impact. The same issue is reported on 8.x here: Invitation etc emails not being sent on the account of the code failing to generate urls · Issue #5266 · getredash/redash · GitHub. That solution did not work for v10.

2 Likes

Hi, thank you for everyone.

I tried inviting new user with Redash v8. It worked completry.

But after update to v10, it does not work.
Even if I added “SERVER_NAME or REDASH_SERVER_NAME”.

# docker-compose run --rm server manage send_test_mail
Starting redash_postgres_1 ... done
Starting redash_redis_1    ... done
(OK)

・・・
# docker-compose run --rm server manage users invite myname1@mydomain1 hoge myname1@mydomain1
Starting redash_postgres_1 ... done
Starting redash_redis_1    ... done
The inviter [myname1@mydomain1] was not found.

I will use v8 for a while.
I will search for the manual(documents) to update for v10.

1 Like