I recently just used Vagrant to install the Production Stack of the Open-edX online learning platform. I followed the blog address at this URL http://iambusychangingtheworld.blogspot.ca/2014/03/edx-platform-to-run-cms-at-port-80.html when it came to configuring the ports that the Open-edX platform listens on, and that worked out well. I would like to thank user Trinh Nguyen. However I would like to know more about configuring SMTP as well so that when users create accounts they receive their activation email. This could help anyone just starting Open-edX development including me. It would be good to know about what files need configuring and other important details. Thank you.
-
There are some detail at this page : [Enable SMTP for EDX (Production Stack)](https://github.com/CDOT-EDX/ProductionStackDocs/wiki/Enable-SMTP-for-EDX-(Production-Stack)) – Bilal Aug 05 '15 at 12:13
3 Answers
As far as I know, after you finish the production stack deployment, the SMTP service will work as desired (can be able to send out emails). And there are something about emails you can do:
- Change the site's domain in the activation email
- ...
And those settings are located at: /edx/app/edxapp , especially these 2 files:
- cms.env.json
- lms.env.json
Hope that will help
Trinh
Updates: To sending email via GMail, add the following settings to the common.py:
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'youruser@yourdomain.com' # or youruser@gmail.com
EMAIL_HOST_PASSWORD = 'YourPassword'
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = 'you@yourdomain.com'
You should restart the edx services, not just the nginx:
LMS/CMS:
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:
Workers:
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp_worker:

- 1,445
- 1
- 14
- 22
-
Hello Trinh could you give an example of the variables that need changing in these files? I have read about changing edx-platform/cms/envs/common.py and setting EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' rather than console. I was trying to use GMAIL as the SMTP server. How would I be able to do this. I was trying to change the settings in edx-platform/cms/envs/common.py but this would not work. I tried $ sudo service nginx restart, but that did not help. Thanks again. – Eddie Mar 22 '14 at 00:26
-
To sending email via GMail, add the following settings to the common.py: EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = 'youruser@yourdomain.com' # or youruser@gmail.com EMAIL_HOST_PASSWORD = 'YourPassword' EMAIL_USE_TLS = True DEFAULT_FROM_EMAIL = 'you@yourdomain.com' You should restart the edx services, not just the nginx: LMS/CMS - sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp: Workers - sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp_worker: – Trinh Nguyen Mar 25 '14 at 02:47
You need next data:
- EMAIL_HOST = "host"
- EMAIL_PORT = 25 or 587
- EMAIL_HOST_USER = "user"
- EMAIL_HOST_PASSWORD = "*******"
- EMAIL_USE_TLS = True
Optionality you can change some configurations more:
- API_ACCESS_FROM_EMAIL
- API_ACCESS_MANAGER_EMAIL
- BUGS_EMAIL
- BULK_EMAIL_DEFAULT_FROM_EMAIL
- CONTACT_EMAIL
- DEFAULT_FEEDBACK_EMAIL
- DEFAULT_FROM_EMAIL
- PAYMENT_SUPPORT_EMAIL
- PRESS_EMAIL
- SERVER_EMAIL
- TECH_SUPPORT_EMAIL
- UNIVERSITY_EMAIL
This are files tha you must change on your installation
- sudo nano /edx/app/edxapp/edx-platform/cms/envs/common.py
- sudo nano /edx/app/edxapp/edx-platform/lms/envs/aws.py
- sudo nano /edx/app/edxapp/lms.env.json
- sudo nano /edx/app/edxapp/cms.env.json
- sudo nano /edx/app/edxapp/lms.auth.json
- sudo nano /edx/app/edxapp/cms.auth.json
And finally you should run this script:
sudo /edx/bin/./supervisorctl restart all

- 491
- 5
- 7
Adding this answer for anyone using Juniper:
The parameters to edit are same but the relevant files are in different location now. You need to edit the following files:
/edx/etc/lms.yml
/edx/etc/studio.yml
Following are the values to edit:
EMAIL_HOST: smtp.gmail.com
EMAIL_HOST_PASSWORD: YOUR_PASSWORD
EMAIL_HOST_USER: 'YOUR_MAIL@domain.com'
EMAIL_PORT: 587
EMAIL_USE_TLS: true
Then restart the following services:
sudo /edx/bin/supervisorctl restart lms
sudo /edx/bin/supervisorctl restart cms
sudo /edx/bin/supervisorctl restart edxapp_worker:
Note: The following files exist but editing them do NOT work anymore:
/edx/app/edxapp/lms.env.json
/edx/app/edxapp/cms.env.json

- 489
- 5
- 20