Configure SMTP for outbound emails

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

NOTE: The Approach A sections referred to below do not apply to Bitnami native installers. Users of Bitnami native installers should refer only to the Approach B sections.

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): installdir/redash

  • Approach B (Self-contained Bitnami installations): installdir/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="" # 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="" # default: None
export REDASH_MAIL_PASSWORD="PASSWORD" # default: None
export REDASH_MAIL_DEFAULT_SENDER="" # Email address to send from
export REDASH_HOST="" # base address of your re:dash instance, for example: ""

After making the changes, restart all servers:

$ sudo installdir/ restart

To configure the application to use other third-party SMTP services for outgoing email, such as SendGrid, refer to the FAQ.

Last modification July 14, 2021