我最近刚刚使用 Vagrant 安装了 Open-edX 在线学习平台的 Production Stack。在配置Open- edX 平台倾听,效果很好。我要感谢用户 Trinh Nguyen。但是,我还想了解更多有关配置 SMTP 的信息,以便用户在创建帐户时收到他们的激活电子邮件。这可以帮助任何刚开始 Open-edX 开发的人,包括我。最好了解需要配置哪些文件和其他重要细节。谢谢你。
问问题
6828 次
3 回答
7
据我所知,在您完成生产堆栈部署后,SMTP 服务将按需要工作(可以发送电子邮件)。你可以做一些关于电子邮件的事情:
- 在激活电子邮件中更改站点的域
- ...
这些设置位于: /edx/app/edxapp ,尤其是这两个文件:
- cms.env.json
- lms.env.json
希望这会有所帮助
郑
更新:要通过 GMail 发送电子邮件,请将以下设置添加到 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'
您应该重新启动 edx 服务,而不仅仅是 nginx:
学习管理系统/CMS:
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:
工作人员:
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp_worker:
于 2014-03-21T23:24:20.890 回答
0
为使用Juniper的任何人添加此答案:
要编辑的参数相同,但相关文件现在位于不同的位置。您需要编辑以下文件:
/edx/etc/lms.yml
/edx/etc/studio.yml
以下是要编辑的值:
EMAIL_HOST: smtp.gmail.com
EMAIL_HOST_PASSWORD: YOUR_PASSWORD
EMAIL_HOST_USER: 'YOUR_MAIL@domain.com'
EMAIL_PORT: 587
EMAIL_USE_TLS: true
然后重启以下服务:
sudo /edx/bin/supervisorctl restart lms
sudo /edx/bin/supervisorctl restart cms
sudo /edx/bin/supervisorctl restart edxapp_worker:
注意:以下文件存在,但不再编辑它们:
/edx/app/edxapp/lms.env.json
/edx/app/edxapp/cms.env.json
于 2021-01-14T03:24:37.057 回答
0
您需要下一个数据:
- EMAIL_HOST = "主机"
- EMAIL_PORT = 25 或 587
- EMAIL_HOST_USER = "用户"
- EMAIL_HOST_PASSWORD = "*******"
- EMAIL_USE_TLS = 真
可选性,您可以更多地更改一些配置:
- API_ACCESS_FROM_EMAIL
- API_ACCESS_MANAGER_EMAIL
- BUGS_EMAIL
- BULK_EMAIL_DEFAULT_FROM_EMAIL
- 联系电子邮件
- DEFAULT_FEEDBACK_EMAIL
- DEFAULT_FROM_EMAIL
- PAYMENT_SUPPORT_EMAIL
- PRESS_EMAIL
- SERVER_EMAIL
- TECH_SUPPORT_EMAIL
- UNIVERSITY_EMAIL
这是您在安装时必须更改的文件
- sudo nano /edx/app/edxapp/edx-platform/cms/envs/common.py
- sudo nano /edx/app/edxapp/edx-platform/lms/envs/aws.py
- 须藤纳米/edx/app/edxapp/lms.env.json
- 须藤纳米/edx/app/edxapp/cms.env.json
- 须藤纳米/edx/app/edxapp/lms.auth.json
- 须藤纳米/edx/app/edxapp/cms.auth.json
最后你应该运行这个脚本:
sudo /edx/bin/./supervisorctl restart all
于 2018-04-17T18:43:10.110 回答