Hey @JB-Dev sorry about the delayed response, there are two changes to the steps I gave you aboe:
Firstly looks like I forgot to set some more env variables in the commands I gave you which I’ve now added below.
Secondly from testing myself locally you also need to make a direct change to the Baserow config file found in: /baserow/baserow/backend/src/baserow/config/settings/base.py
Could you first edit: /baserow/baserow/backend/src/baserow/config/settings/base.py
and find the line EMAIL_BACKEND = "djcelery_email.backends.CeleryEmailBackend"
and change it to be EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
. You will probably need to become root to edit this file as I believe the guide has you install baserow using the root user.
This will force Baserow not to use redis and celery to send emails asynchronously, but instead just do it immediately inside the Baserow server, which will let us debug the underlying issue. Once debugged I would recommend reverting the change above.
cd /baserow
source env/bin/activate
export DJANGO_SETTINGS_MODULE='baserow.config.settings.base'
export EMAIL_SMTP='TRUE'
export EMAIL_SMTP_HOST='smtp.gmail.com'
export EMAIL_SMTP_USE_TLS='TRUE'
export EMAIL_SMTP_PORT=587
export EMAIL_SMTP_USER='my@email.com'
export EMAIL_SMTP_PASSWORD='mypassword'
export FROM_EMAIL='my@email.com'
# Missed commands from last time
# These should exactly match what you have set in your `baserow.conf`
export REDIS_HOST='localhost'
export DATABASE_HOST='localhost'
export DATABASE_PASSWORD='REPLACE_WITH_YOUR_DB_PASSWORD'
export MJML_SERVER_HOST='localhost'
baserow shell
Now try copy and pasting the following into the newly opened baserow shell
after replacing the REPLACE_WITH_TO_EMAIL_ADDRESS
with the email address you want to test sending an email to.
from django.core.mail import EmailMessage
from django.conf import settings
email = EmailMessage(
'title',
'msg',
settings.FROM_EMAIL,
['REPLACE_WITH_TO_EMAIL_ADDRESS'],
)
email.send(fail_silently=False)