Migrating to new SMTP service after GMail policy change

Hey @issa ,

I am working on this on my server. I want that when the user will click on the Reset Password button on the login page of ODK Central. Then he can get a link with my either Gmail/outlook account. However, After the announcement of google new policy, I am unable to send the password reset link, here is the policy link: https://www.neowin.net/news/google-no-longer-allows-username-and-passwords-on-third-party-email-applications/

My old script was this: SMTP Error: Missing credentials for “LOGIN” with gmail - #2 by yanokwa
Now, I want that from my outlook account(office365), Can I send a password reset link? If yes, please provide me with help docs if you have any.

I tried this SMTP service as well : https://support.microsoft.com/en-us/office/pop-imap-and-smtp-settings-8361e398-8af4-4e97-b147-6c6c4ac95353
But did not get success to get the password reset link.
After changing the SMTP(I follow these steps https://docs.getodk.org/central-install-digital-ocean/#using-a-custom-mail-server) service, I am getting an error 500 on the password reset page.

My server version's are :
24ee74e5f974a518aa1cc8b06e7addb3be6b4690 (v1.3.3-2-g24ee74e)
5cc6fd79d112ce36d6298c61bb8817689c4c323b client (v1.3.2)
1d1a3a59969e61383da74119e405e67778b7a170 server (v1.3.3)


is there a reason you can’t use the smtp server that’s built into central?

Hey @issa,

Thank you, for your response. Yes, you are correct that ODK is shipping with SMTP services.
I check this document(https://docs.getodk.org/central-install-digital-ocean/#using-a-custom-mail-server) but was unable to get an email to reset the password.
After this, I check out and find that I can use Gmail SMTP and I updated "files/service/config.json.template" according to Gmail SMTP, here is detailed link:
SMTP Error: Missing credentials for “LOGIN” with gmail - #3 by iamnarendrasingh

Now, after stopping support of Less Secure App on Gmail(https://support.google.com/accounts/answer/6010255?hl=en). Now, the reset password button. is not working for my Gmail.
If you can guide me on how can I use default EXIM then please let me know.


Central will send the email itself without using Gmail (or any other email service).

You need to revert the changes in files/service/config.json.template so the email section looks like this:

    "email": {
      "serviceAccount": "no-reply@${DOMAIN}",
      "transport": "smtp",
      "transportOpts": {
        "host": "mail",
        "port": 25

The downside of that is that users may not receive your emails because they may be marked as spam. See https://docs.getodk.org/central-troubleshooting/#users-aren-t-receiving-emails for more.

Ultimately, the best solution is to use a mail service like Mailjet or if you are using AWS, SES.

1 Like

Hello @yanokwa is there a possibility to in future have all mails from central (whether on Google cloud or self-hosted) reference a standard SMTP server that will see mails not ending up in the spams folder. So, end users will just specify addresses they want to channel mails to.

Email sounds like a simple technology, but in practice there are many things that can cause message delivery issues. Our Users aren't receiving emails troubleshooting write up explains why in greater detail.

One of the benefits of getting an ODK Cloud subscription is that we partner with trusted email delivery platforms to ensure that password resets don't get marked as spam. Further, we isolate every customer's account so that if Customer A's messages get marked as spam, Customer B's messages will still be delivered. We continuously monitor deliverability and make adjustments as needed.

Making this functionality available to ODK users who are self-hosting is something we explored, but it would be costly for us to build and run. It's also not sensible, because those users could just as easily configure Central to use one of the many email delivery platforms that already exist. We provide instructions at https://docs.getodk.org/central-install-digital-ocean/#central-install-digital-ocean-custom-mail.

If you are having deliverability issues with Central's built in mail-server, try Mailjet as the documentation suggests. It is free if you are sending less than 200 emails a day.

1 Like

Thanks for the detailed response. I appreciate

1 Like