Configure SMTP for outbound emails
NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:
$ test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."
The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.
For the system to be able to send emails, set the mail server to use and the host name of your Re:dash server. Do this by adding the lines below in the .env file inside the Redash installation directory.
NOTE: Depending on your installation type, the Redash .env file can be found in the following locations:
Approach A (Bitnami installations using system packages): /opt/bitnami/redash
Approach B (Self-contained Bitnami installations): /opt/bitnami/apps/redash/htdocs/
The example shown below uses Gmail for outbound email. Remember to update this with equivalent values for your SMTP host or, if using Gmail, replace the USERNAME and PASSWORD placeholders with correct values for your Gmail account.
export REDASH_MAIL_SERVER="smtp.gmail.com" # default: localhost export REDASH_MAIL_PORT="587" # default: 25 export REDASH_MAIL_USE_TLS="true" # default: False export REDASH_MAIL_USE_SSL="true" # default: False export REDASH_MAIL_USERNAME="USERNAME@gmail.com" # default: None export REDASH_MAIL_PASSWORD="PASSWORD" # default: None export REDASH_MAIL_DEFAULT_SENDER="USERNAME@gmail.com" # Email address to send from export REDASH_HOST="" # base address of your re:dash instance, for example: "https://demo.redash.io"
After making the changes, restart all servers:
$ sudo /opt/bitnami/ctlscript.sh restart
To configure the application to use other third-party SMTP services for outgoing email, such as SendGrid, refer to the FAQ.