Custom SMTP Configuration Not Applied After tutor config save

Description:

I am experiencing an issue with applying custom SMTP configurations using the tutor config save command in Tutor for managing Open edX platforms. Here’s a detailed description of the problem:

Issue: When I set custom SMTP configuration settings in the config.yml file as follows:

EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST: smtp.gmail.com
EMAIL_HOST_PASSWORD: nhwy wnek zswo ftfz
EMAIL_HOST_USER: smtp.iovision@gmail.com
EMAIL_PORT: 587
EMAIL_USE_SSL: false
EMAIL_USE_TLS: true

and then run tutor config save, the custom SMTP settings are not applied in the generated environment configuration files (lms.env.yml and cms.env.yml). Instead, the files contain the following default settings:

EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST: "smtp"
EMAIL_PORT: 8025
EMAIL_USE_TLS: false
EMAIL_HOST_USER: ""
EMAIL_HOST_PASSWORD: ""

Additional Information:

  • The custom configuration is properly applied for other parameters like PLATFORM_NAME.
  • Manual changes to the env/ folder configurations are overwritten by the settings in config.yml.

Steps Taken:

  1. Edited the config.yml file with custom SMTP settings.
  2. Ran tutor config save.
  3. Verified the settings in lms.env.yml and cms.env.yml files.

Expected Behavior: The custom SMTP configuration set in config.yml should be applied and reflected in lms.env.yml and cms.env.yml files after running tutor config save.

Request: Could someone from the community please provide guidance on how to ensure that custom SMTP settings in config.yml are correctly applied to the environment configuration files? Is there a known issue or workaround for this problem?

Thank you for your assistance!

config.yml is only meant for Tutor’s functionalities. config does not override platform or any other service’s settings. If you want to override settings, you would need to create your plugin and add an appropriate patch, like openedx-common-settings.
As an example, please see how tutor-notes does that tutor-notes/tutornotes/patches/openedx-common-settings at master · overhangio/tutor-notes · GitHub.

Hi @Med_amine_Boujelben1,

The correct settings in your config.yml file woud be:

RUN_SMTP: false
SMTP_HOST: smtp.gmail.com
SMTP_PASSWORD: nhwy wnek zswo ftfz
SMTP_PORT: 587
SMTP_USERNAME: smtp.iovision@gmail.com
SMTP_USE_TLS: true

Hope it helps!
Andrés