我已安装Open edX bitnami ami并对其进行测试。我遇到smtp电子邮件配置问题。我按照这里的说明操作:Bitnami Open edX - How to configure outbound email settings
但那没用。电子邮件未发送,我无法通过查看日志文件来查找原因。然后我按照这里的配置:Enable SMTP for EDX (Production Stack)并使用postfix
smtp邮件服务配置mandrill
。从服务器,此命令有效:
sendemail -f registration@myedx.com -t mymail@gmail.com -m "Message Body" -u "Message Subject"
但是形成edX
实例我收到错误。 edx.log
文件如下所示:
Traceback (most recent call last):
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 109, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view
return view_func(*args, **kwargs)
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/views/decorators/http.py", line 41, in inner
return func(request, *args, **kwargs)
File "/opt/bitnami/apps/edx/edx-platform/common/djangoapps/student/views.py", line 1890, in password_reset
domain_override=request.get_host())
File "/opt/bitnami/apps/edx/edx-platform/common/djangoapps/student/forms.py", line 72, in save
send_mail(subject, email, from_email, [user.email])
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/core/mail/__init__.py", line 61, in send_mail
connection=connection).send()
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/core/mail/message.py", line 248, in send
return self.get_connection(fail_silently).send_messages([self])
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 85, in send_messages
new_conn_created = self.open()
File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 50, in open
self.connection.ehlo()
File "/opt/bitnami/python/lib/python2.7/smtplib.py", line 413, in ehlo
self.putcmd(self.ehlo_msg, name or self.local_hostname)
File "/opt/bitnami/python/lib/python2.7/smtplib.py", line 341, in putcmd
self.send(str)
File "/opt/bitnami/python/lib/python2.7/smtplib.py", line 333, in send
raise SMTPServerDisconnected('please run connect() first')
SMTPServerDisconnected: please run connect() first
知道如何解决这个问题吗?或者我如何在bitnami edX
实例中激活smtp电子邮件?