Email Not Sending on VM

Keywords: Re:dash - Virtual Machines - Technical issue - Email configuration (SMTP)

bnsupport ID: 0681d5a9-efbb-3923-56ea-7e15108315c8

bndiagnostic output:

? Connectivity: Found possible issues
https://docs.bitnami.com/general/faq/administration/use-firewall/

bndiagnostic failure reason: The tool could not find any issue

Description:

[2021-11-25 22:12:44,670][PID:10126][ERROR][ForkPoolWorker-21] task_name=redash.tasks.send_mail task_id=1240a717-8fc5-4c1d-94e9-7605cbbc9771 Failed sending message: Reset your password
Traceback (most recent call last):
 File "/opt/bitnami/redash/redash/tasks/general.py", line 58, in send_mail
   mail.send(message)
 File "/opt/bitnami/redash/venv/lib/python2.7/site-packages/flask_mail.py", line 492, in send
   message.send(connection)
 File "/opt/bitnami/redash/venv/lib/python2.7/site-packages/flask_mail.py", line 427, in send
   connection.send(self)
 File "/opt/bitnami/redash/venv/lib/python2.7/site-packages/flask_mail.py", line 178, in send
   "The message does not specify a sender and a default sender "

cat redash-scheduler.log

All env vars are set for mail but keep getting this issue.

Looks like a bug in the hosted VM that flask-mail is not picking up the environment values.

i’ve set both reash and mail variables and still getting the same.

Hello @txt3rob,

Thank you for using our Redash stack! Our bndiagnostic tool didn’t retrieve some of of your redash config, could you please share with us the output of the following command:

cat /opt/bitnami/redash/.env

Also, keep in mind you need to set the value of REDASH_HOST, which is the base address of your Redash instance (the DNS name or IP) with the protocol.

Regards,
Francisco de Paz

It appears that this email is not sending. These are my recommendations:
-The security settings for your account need to be set up in such a way that all incoming messages can come through, or alternatively, adjust the spam filter settings for your inbox to allow all messages from the specific sender list.
-You may want to click the “Help” link and select “I’m having unusual problems sending and receiving mail,”

# Redash settings
REDASH_LOG_LEVEL="DEBUG"
REDASH_COOKIE_SECRET="XXXXXXXXXXXXX"
REDASH_SECRET_KEY="XXXXXXXX"
# Custom date format (default is DD/MM/YY)
REDASH_DATE_FORMAT="DD/MM/YY"
# Use an absolute path instead of a default relative path
REDASH_STATIC_ASSETS_PATH="/opt/bitnami/redash/client/dist/"
# Application URL configuration (required for mail server configuration)
REDASH_HOST="http://192.168.1.169"
REDASH_ENFORCE_HTTPS="false"


REDASH_MAIL_SERVER="smtp.gmail.com"
REDASH_MAIL_PORT="587"
REDASH_MAIL_USE_TLS="true"
REDASH_MAIL_USE_SSL="true"
REDASH_MAIL_USERNAME="me@gmail.com"
REDASH_MAIL_PASSWORD="adsadasd"
MAIL_DEFAULT_SENDER="me@gmail.com"
REDASH_MAIL_DEFAULT_SENDER="me@gmail.com"

# Redis settings
REDASH_REDIS_URL="redis://127.0.0.1:6379/0"

# PostgreSQL settings
REDASH_DATABASE_URL="postgresql://bn_redash:XXXXXXXX@127.0.0.1:5432/bitnami_redash"

Hi @txt3rob

Thanks for sharing the content of your file. It seems you have an extra line that is not required (MAIL_DEFAULT_SENDER ), but that should not make any difference. The rest of the variables look OK at first sight.

On the other hand, it is very important to restart the services after adding those modifications to the .env file so as to make sure the new configuration is applied. Just to make sure, have you already executed the following?

sudo /opt/bitnami/ctlscript.sh restart

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart: