How to setup smtp email in production

I have installed juniper.master on aws following the instructions in this blog:
Everything is up and running,except for the email sending.
I am not getting emails during signup and reset password.
What I’ve done:

  1. Edited the following properties inside lms.env.json and cms.env.json files, and set my email adress where emails are required( eg:- “DEFAULT_FEEDBACK_EMAIL”: “”,)

    “EMAIL_BACKEND”: “django.core.mail.backends.smtp.EmailBackend”,
    “EMAIL_HOST”: “”,
    “EMAIL_PORT”: 587,
    “EMAIL_USE_TLS”: true,
  2. Edited the following properties inside lms.auth.json and cms.auth.json files
    “EMAIL_HOST_PASSWORD”: “emailpassword”,
    “EMAIL_HOST_USER”: “”,
  3. I restarted open edx
    /edx/bin/supervisorctl restart lms
    /edx/bin/supervisorctl restart cms
    /edx/bin/supervisorctl restart edxapp_worker:

Am i missing something here?
Thanks in advance for your help!

This issue was resolved by editing the same properties inside /edx/etc/lms.yml file

1 Like

But the activation email is providing a broken account activation link that points to “http://localhost”.
In my configuration file in /edx/app/edxapp/lms.env.json, as well edx/etc/lms.yml , I have these

“LMS_BASE”: “”,

Any ideas?

Thanks in advance!

2 options:

1- in your site_configuration, in LMS Django Admin, check that you have “lms_root_url”:“ , and edit the file “lms/templates/emails/activation_email.txt”, change “lms_url” by “lms_root_url

2- just go and edit the file “lms/templates/emails/activation_email.txt”, change “lms_url” by “LMS_ROOT_URL

Restart all services, and try again.

That’s how i fixed it.


1 Like

Thanks @Herve_siyou . site name was not filled on lms.env.json and cms.env.json files.When I correct that, the problem was fixed.
Your solutions are also correct.

1 Like

(for JUNIPER release)
Edited the following properties inside /edx/etc/lms.yml and /edx/etc/studio.yml
(Used AWS SES for email)

“EMAIL_BACKEND”: “django.core.mail.backends.smtp.EmailBackend”,
“EMAIL_PORT”: 587,
“EMAIL_USE_TLS”: true,
“EMAIL_HOST_PASSWORD”: “emailpassword”,

Restarted open edx -
/edx/bin/supervisorctl restart lms cms edxapp_worker: