Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure all emails are stored to a tmp file in development
In development, emails sent from edx-platform were using the "file_email" channel from edx-ace ("edX's automated communication engine"). This channel was failing because it tries to write to a file located in the /edx folder, which does not exist in tutor containers. To fix this, we configure edx-ace to rely on the django email backend, which itself is configured to send emails to a file in development. It turns out that this backend was also configured to store emails in a file located in the /edx folder, so we had to add the standard EMAIL_FILE_PATH django setting to our development settings. It was easier to reconfigure the django file email backend than the edx-ace file_email channel because the output path of the latter cannot be modified by a setting. Note that this causes all emails to be stored in local files instead of being sent to actual recipients. This is the default behaviour in Open edX, and indeed in most default django apps (in development). This is a good thing! If, for some reason, developers would like to try out email sending during development, they should modify the EMAIL_BACKEND setting and set it to 'django.core.mail.backends.smtp.EmailBackend'. This is quite easy to achieve with the help of a plugin: name: sendemailsindev version: 0.1.0 patches: openedx-development-settings: | # actually send emails in dev EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" Close #315
- Loading branch information