简体   繁体   English

未发送打开的edX smtp电子邮件

[英]Open edX smtp email not being sent

I have installed Open edX bitnami ami and now testing it. 我已经安装了Open edX bitnami ami,现在对其进行了测试。 I want to send emails from the edX instance like registration confirmation email. 我想从edX实例发送电子邮件,例如注册确认电子邮件。 I have followed the documentation here: How to configure outbound email settings I used mandrill smtp host instead of gmail. 我在这里遵循了文档: 如何配置出站电子邮件设置我使用的是mandrill smtp主机而不是gmail。 But I could not receive any mail as for some reason the configuration did not work. 但是由于某种原因,我无法收到任何邮件,因为该配置无法正常工作。 How can I configure the email settings? 如何配置电子邮件设置? I also want to know where are the console email being logged and where to look for to solve email issues? 我还想知道控制台电子邮件记录在哪里,以及在哪里寻找解决电子邮件问题的方法?

I was just able to get it to work. 我只是能够使它工作。 Here's how I did this: 这是我的操作方式:

  1. I followed the "Gmail SMTP" guide on the Bitnami Wiki for Open edX. 我遵循了Bitnami Wiki for Open edX上的“ Gmail SMTP”指南。
  2. Make sure you replace all ocurrences of "smtp.gmail.com" by "smtp.mandrillapp.com" in all edX configuration files: lms.env.conf, lms.auth.conf, cms.env.conf, cms.auth.conf. 确保在所有edX配置文件中将“ smtp.gmail.com”的所有出现都替换为“ smtp.mandrillapp.com”:lms.env.conf,lms.auth.conf,cms.env.conf,cms.auth。 conf。
  3. Change all the occurrences of EMAIL_HOST_USER and EMAIL_HOST_PASSWORD accordingly. 相应地更改所有出现的EMAIL_HOST_USER和EMAIL_HOST_PASSWORD。
  4. Restart Apache. 重新启动Apache。
  5. Test it, for example, log in and try to change your email address to a valid one. 测试它,例如,登录并尝试将您的电子邮件地址更改为有效的电子邮件地址。 You should get a verification mail. 您应该收到验证邮件。

By the way, I've updated the Bitnami wiki including Mandrill configuration: https://wiki.bitnami.com/Applications/Bitnami_Open_edX#SMTP_configure_for_Mandrill (just updated, you should also add the DEFAULT_FROM_EMAIL field). 顺便说一下,我已经更新了包括Mandrill配置在内的Bitnami Wiki: https : //wiki.bitnami.com/Applications/Bitnami_Open_edX#SMTP_configure_for_Mandrill (刚刚更新,您还应该添加DEFAULT_FROM_EMAIL字段)。 Hope it helps. 希望能帮助到你。

Change following attributes in common.py and aws.py 更改common.pyaws.py以下属性

django.core.mail.backends.console.EmailBackend to django.core.mail.backends.console.EmailBackend

django.core.mail.backends.smtp.EmailBackend

Set the value in lms.env.json 在lms.env.json中设置值

EMAIL_HOST="smtp.gmail.com", EMAIL_PORT="587", EMAIL_HOST_USER="emailid", EMAIL_HOST_PASSWORD="password" and EMAIL_USE_TLS="true" EMAIL_HOST="smtp.gmail.com", EMAIL_PORT="587", EMAIL_HOST_USER="emailid", EMAIL_HOST_PASSWORD="password"EMAIL_USE_TLS="true"

then restart your edx sudo /edx/bin/supervisorctl restart edxapp: 然后重新启动edx sudo /edx/bin/supervisorctl restart edxapp:

sudo /edx/bin/supervisorctl restart edxapp_worker:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM