I fixed it by setting the SMTP parameters to the Sidekiq as well
In /opt/bitnami/scripts/discourse-env.sh
these are exported
DISCOURSE_SMTP_HOST
DISCOURSE_SMTP_ADDRESS
DISCOURSE_SMTP_PORT_NUMBER
DISCOURSE_SMTP_USER
DISCOURSE_SMTP_USER_NAME
DISCOURSE_SMTP_PASSWORD
But Sidekiq was expecting the parameters not to have the DISCOURSE_ prefix.
So adding the following fixed the problem:
export SMTP_HOST=“xxx”
export SMTP_ADDRESS=“xx”
export SMTP_PORT_NUMBER=“587”
export SMTP_USER=“xxx”
export SMTP_USER_NAME=“xxx”
export SMTP_PASSWORD=“xxx”