Smtp does not work I get Server error

Hi @tom

I’running on mine on azure but if that helps you take a look the next steps that I followed:

IMPORTANT: Before editing the files, please create a copy of the originals as backup, ie:

 sudo cp file.ext cp file.ext.old

And please mind the quotes if the original file has it. Only in lms.yml I found that some of them has '' (two single quotes), so that means empty and you can input the right data without the quotes.

1. There is one small but important change that you’ll need to make to your default Gmail account settings in order for Gmail to allow Open edX to connect. After logging in to your Gmail account from a web browser, navigate to https://myaccount.google.com/lesssecureapps to change the setting for “Allow less secure apps” to “On”. Source

2.a. Edit lms.auth.json and cms.auth.json in /edx/app/edxapp/ as follows:

"EMAIL_HOST_PASSWORD": "password",
"EMAIL_HOST_USER": "name@domain.com",

2.b. Edit lms.env.json and cms.env.json in /edx/app/edxapp/ as follows:

"EMAIL_BACKEND": "django.core.mail.backends.smtp.EmailBackend",
"EMAIL_HOST": "smtp.gmail.com",
"EMAIL_PORT": 587,
"EMAIL_USE_TLS": true,

Source here.

3. Edit the following in /edx/etc/lms.yml

EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST: smtp.gmail.com
EMAIL_HOST_PASSWORD: password
EMAIL_HOST_USER: name@domain.com
EMAIL_PORT: 587
EMAIL_USE_TLS: true

Source here.

4. Restart lms, cms and edxapp_worker

/edx/bin/supervisorctl restart lms cms edxapp_worker:

  1. You can check the logs in /edx/var/log/lms/edx.log to get more information on that.

I wish yo can find a solution.

Cheers,