Setting up SMTP with Digital Ocean Setup

I setup Gramps Web through the one-click digital ocean setup and I’ve gotten it running finally. The only problem I noticed is that during the entire setup, there was nowhere to setup my SMTP configuration.

I tried adding environment variables to my google mail account but nothing is happening. This problem comes up when a user wants to create an account but is waiting for the confirmation email, which is never sent.

Danny,

In the DO setup, email configuration should be part of the same form where you create the admin account.

Thanks for the reply David, this isn’t the case for me. During the initial setup, it only asked the admin user name and password and my email. Nothing about SMTP configuration.

Is there a way to configure it after the initial setup? Or must I restart from scratch?

Also, are you aware if Gmail can not be used?

GMail requires OAuthm, so it cannot be used.

You can modify the config by editing environment variables in the docker compose file at /opt/grampsweb.

I’ve set Mailgrid to be used as my SMTP server and input the information as such

GRAMPSWEB_BASE_URL: “https://shiga.ca
GRAMPSWEB_EMAIL_HOST: “smtp.mailgun.org
GRAMPSWEB_EMAIL_PORT: 465
GRAMPSWEB_EMAIL_USE_TLS: True
GRAMPSWEB_EMAIL_HOST_USER: “minatogawafamilytree@gmail.com
GRAMPSWEB_EMAIL_HOST_PASSWORD: “password-inplace”
GRAMPSWEB_DEFAULT_FROM_EMAIL: “minatogawafamilytree@gmail.com

In the grampsweb section of the docker-compose file but I still don’t get any email sent or any error in the logs. @DavidMStraub What log do I look at to see the emailing error?

The Celery log. You can also use the command line (python -m gramps_webapi ...) to send dummy emails for testing. Try setting GRAMPSWEB_EMAIL_USE_TLS: False, it is sometimes needed.

No wait, there is actually an error in your config (and my answer), true and false need to be lowercase, see the Info box just before here: Server configuration - Gramps Web

This is a Flask thing, so don’t blame me.

Thanks @DavidMStraub, I adjusted the configuration and I viewed the celery log and can see that the Connection to SMTP server refused.

Still unsure what setting is incorrect, I’m now using mailgrid for SMTP connection.

1 Like