Mail server configuration could not be set up

Keywords: Re:dash - AWS - How to - Email configuration (SMTP)
Description:
Hey,
I followed this doc to setup mail server configuration https://docs.bitnami.com/installer/apps/redash/configuration/configure-smtp/
The export statements did not make changes to .env
So made the changes using sudo vi .env editor
Added all the fields except username and password and restarted all the services using ctlscript.sh
Still on logging in the UI tells that the mail server is not configured
Can you help me figuring out what might be going wrong :face_with_head_bandage:

Hello @Meliodas,

You need to add the export lines to the env configuration file at /apps/redash/htdocs/.env. Did you add the lines with the export directive included? Also, unless you are using an SMTP service that doesn’t require authentication, you need to include both REDASH_MAIL_USERNAME and REDASH_MAIL_PASSWORD so that Re:dash can connect to your mail account.

Regards,
Francisco de Paz

Hey @fdepaz,
Thank you for the help
Looks like the mail server is configured now :blush::blush:

But then I tried to invite people, no mail or invite was sent to them :cry:

I used mail server as smtp.gmail.com and port as 587
Use of SSL and TLS was also enabled.
I did not add the mail and password. (As SMTP is there :sweat_smile:)

Can you tell me if I should change something in the .env
Thank you :slightly_smiling_face:

Hello @Meliodas,

I’m not sure I understand, you need to include your mail, username, and password in the .env file to configure SMTP properly. As you are using a Gmail account, you can just copy the contents at Configure SMTP For Outbound Emails, only replacing USERNAME@gmail.com and PASSWORD with your auth data. If you have any issues, please share the lines you added to .env (censoring your password and email) so we can help you.

Regards,
Francisco de Paz

@fdepaz
My .env file at the moment looks like this…

 # Re:dash settings
export  REDASH_MAIL_SERVER="smtp.gmail.com"
export  REDASH_MAIL_PORT="465"
export  REDASH_MAIL_TLS="true"
export  REDASH_MAIL_SSL="true"
export REDASH_MAIL_DEFAULT_SENDER="myemail@gmail.com"
export  REDASH_MAIL_USERNAME="myemail@gmail.com"
export  REDASH_MAIL_PASSWORD="mypassword"
export  REDASH_HOST="redashnlb-1223636283.elb.region.amazonaws.com"

Hope this helps :crossed_fingers::blush:
Thank you

Hello @Meliodas,

Could you try using SMTP without encryption and/or changing the used port to 587? It may be an issue with Google and this could help find the cause. Also, keep in mind that Gmail will send you an email asking for confirmation to start using SMTP in your account that you need to accept, please make sure you have done it.

Regards,
Francisco de Paz

Hey @fdepaz,

I disabled SSL and TLS encryptions (set them to false)
Also changed port to 587
Still, the same thing :frowning:

But I want to bring to your attention that I specified the same mail ID in my profile of Redash. It popped up message saying
We have sent an email with a confirmation link to your email address. Please verify your email address. RESEND MAIL

I did not get any mail even for the verification after this.

based on this, same problem might have occurred in setting the mail configuration
Can you please check if the mails are being sent from your side?

Thank you :blush:

Hello @Meliodas,

We do not send any of the emails we are discussing; the popped-up message regarding the confirmation email is internal of re-dash and said confirmation email will be send using your configured SMTP account, which at the moment doesn’t work. The confirmation email I talked about was one that Gmail itself will send you to confirm you want to use your Gmail with SMTP. Please check whether you have that second email. If not, please try following the step in our Troubleshoot Gmail SMTP Issues guide to enable access to less secure apps in Gmail.

Also, remember to restart your services running:

sudo /opt/bitnami/ctlscript.sh restart

Regards,
Francisco de Paz