Invite emails not sending

I’m running into an issue where I can add a new invite for a user, but the corresponding email is never sent.

I have a self-hosted instance. I’m running a docker container in Google Cloud compute engine.

I’m starting the docker image with this command:

sudo docker run -e BASEROW_PUBLIC_URL=http://[MY IP]
–name baserow
-d
–restart unless-stopped
-v baserow_data:/baserow/data
-v EMAIL_SMTP=True
-v EMAIL_SMTP_USE_TLS=True
-v EMAIL_SMTP_HOST=‘smtp.gmail.com
-v EMAIL_SMTP_USER=‘[my email address]’
-v EMAIL_SMTP_PORT=587
-v EMAIL_SMTP_PASSWORD=‘[my app-specific email password]’
-p 80:80
-p 443:443
-p 587:587
baserow/baserow:1.14.0

I have tried the debugging steps suggested in this issue:

and when I use the shell to send an email, I can see the email in the outbox of my email address, and the recipient receives it.

However, when I create a new user invitation

  • the user invitation is created successfully and appears in the list of invites
  • but no email is received by the invited email address
  • and no email appears in the outbox of the email address I am using for sending.

I’ve had a look at the logging output and there are no obvious errors. Here’s a sample:

[BACKEND][2023-03-10 02:35:02] 38.141.208.122:0 - “POST /api/user/token-refresh/ HTTP/1.1” 200
[BACKEND][2023-03-10 02:35:03] 38.141.208.122:0 - “DELETE /api/groups/invitations/15/ HTTP/1.1” 204
[BACKEND][2023-03-10 02:35:09] 38.141.208.122:0 - “GET /api/groups/invitations/group/52/ HTTP/1.1” 200
[CELERY_WORKER][2023-03-10 02:35:21] [2023-03-10 02:07:26,254: INFO/ForkPoolWorker-1] Task djcelery_email_send_multiple[b20a558f-59e7-4a56-b679-92dc56b5e17c] succeeded in 0.004744883626699448s: 1
[CELERY_WORKER][2023-03-10 02:35:21] [2023-03-10 02:35:21,189: INFO/MainProcess] Task djcelery_email_send_multiple[049dcb18-642f-4fb6-abb0-d8a027314e47] received
[CELERY_WORKER][2023-03-10 02:35:21] [2023-03-10 02:35:21,194: WARNING/ForkPoolWorker-1] Content-Type: multipart/alternative;
[CELERY_WORKER][2023-03-10 02:35:21] boundary=“===============3990200361053252203==”
[CELERY_WORKER][2023-03-10 02:35:21] MIME-Version: 1.0
[CELERY_WORKER][2023-03-10 02:35:21] Subject: [person] invited you to Business development - Baserow
[CELERY_WORKER][2023-03-10 02:35:21] From: no-reply@localhost
[CELERY_WORKER][2023-03-10 02:35:21] To: [address]
[CELERY_WORKER][2023-03-10 02:35:21] Date: Fri, 10 Mar 2023 02:35:21 -0000
[CELERY_WORKER][2023-03-10 02:35:21] Message-ID: 167841572119.394.17098107015332651457@f976919bf46b
[CELERY_WORKER][2023-03-10 02:35:21]
[CELERY_WORKER][2023-03-10 02:35:21] --===============3990200361053252203==
[CELERY_WORKER][2023-03-10 02:35:21] Content-Type: text/plain; charset=“utf-8”
[CELERY_WORKER][2023-03-10 02:35:21] MIME-Version: 1.0
[CELERY_WORKER][2023-03-10 02:35:21] Content-Transfer-Encoding: 7bit
[CELERY_WORKER][2023-03-10 02:35:21]
[CELERY_WORKER][2023-03-10 02:35:21]
[CELERY_WORKER][2023-03-10 02:35:21] Invitation
[CELERY_WORKER][2023-03-10 02:35:21] [person] has invited you to collaborate on Business development.

[CELERY_WORKER][2023-03-10 02:35:21]
[CELERY_WORKER][2023-03-10 02:35:21] --===============3990200361053252203==–
[CELERY_WORKER][2023-03-10 02:35:21] [2023-03-10 02:35:21,197: WARNING/ForkPoolWorker-1] -------------------------------------------------------------------------------

There is no subsequent error in the logs.

Does anyone have any debugging ideas?

thanks.

Hi @hugh,

the command should use -e instead of -v for all the environment variables.
So the docker command should be something like this:

sudo docker run -e BASEROW_PUBLIC_URL=http://[MY IP]
–name baserow
-d
–restart unless-stopped
-v baserow_data:/baserow/data
-e EMAIL_SMTP=True
-e EMAIL_SMTP_USE_TLS=True
-e EMAIL_SMTP_HOST=‘smtp.gmail.com’
-e EMAIL_SMTP_USER=’[my email address]’
-e EMAIL_SMTP_PORT=587
-e EMAIL_SMTP_PASSWORD=’[my app-specific email password]’
-p 80:80
-p 443:443
-p 587:587
baserow/baserow:1.14.0

Without -e, you’re not overriding the defaults so what you can see is the default behavior in the logs that prints the email message to the standard output.

Please ensure to use an app password as described here if you’re using Gmail as SMTP server: Sign in with App Passwords - Google Account Help

1 Like

Thanks! That was indeed my problem. I am now able to send emails from my instance successfully.