django - SMTPDataError at/accounts/signup/(553, b'不允许作为 webmaster@localhost 进行中继')

标签 django smtp django-allauth zoho

我使用的是 Django 1.7,为了进行身份验证,我使用的是 Django allauth。为了发送电子邮件,我开始使用 zoho smtp 服务器。它能够发送普通邮件和交易邮件,但无法发送注册 session 电子邮件。它显示错误:

SMTPDataError at /accounts/signup/
(553, b'Relaying disallowed as webmaster@localhost')

回溯是:

69.             return self.dispatch(request, *args, **kwargs)
File "C:\Python34\lib\site-packages\django\utils\decorators.py" in _wrapper
  29.             return bound_func(*args, **kwargs)
File "C:\Python34\lib\site-packages\django\views\decorators\debug.py" in sensitive_post_parameters_wrapper
  76.             return view(request, *args, **kwargs)
File "C:\Python34\lib\site-packages\django\utils\decorators.py" in bound_func
  25.                 return func.__get__(self, type(self))(*args2, **kwargs2)
File "C:\Users\sp\industryo\allauth\account\views.py" in dispatch
  167.         return super(SignupView, self).dispatch(request, *args, **kwargs)
File "C:\Users\sp\industryo\allauth\account\views.py" in dispatch
  62.                                             **kwargs)
File "C:\Users\sp\industryo\allauth\account\views.py" in dispatch
  145.                                                           **kwargs)
File "C:\Python34\lib\site-packages\django\views\generic\base.py" in dispatch
  87.         return handler(request, *args, **kwargs)
File "C:\Users\sp\industryo\allauth\account\views.py" in post
  78.             response = self.form_valid(form)
File "C:\Users\sp\industryo\allauth\account\views.py" in form_valid
  183.                                self.get_success_url())
File "C:\Users\sp\industryo\allauth\account\utils.py" in complete_signup
  162.                          signal_kwargs=signal_kwargs)
File "C:\Users\sp\industryo\allauth\account\utils.py" in perform_login
  123.             send_email_confirmation(request, user, signup=signup)
File "C:\Users\sp\industryo\allauth\account\utils.py" in send_email_confirmation
  291.                                                     signup=signup)
File "C:\Users\sp\industryo\allauth\account\models.py" in send_confirmation
  60.         confirmation.send(request, signup=signup)
File "C:\Users\sp\industryo\allauth\account\models.py" in send
  137.                                 ctx)
File "C:\Users\sp\industryo\allauth\account\adapter.py" in send_mail
  100.         msg.send()
File "C:\Python34\lib\site-packages\django\core\mail\message.py" in send
  286.         return self.get_connection(fail_silently).send_messages([self])
File "C:\Python34\lib\site-packages\django\core\mail\backends\smtp.py" in send_messages
  99.                 sent = self._send(message)
File "C:\Python34\lib\site-packages\django\core\mail\backends\smtp.py" in _send
  115.             self.connection.sendmail(from_email, recipients, message.as_bytes(linesep='\r\n'))
File "C:\Python34\lib\smtplib.py" in sendmail
  800.             raise SMTPDataError(code, resp)

Exception Type: SMTPDataError at /accounts/signup/
Exception Value: (553, b'Relaying disallowed as webmaster@localhost')

这里有什么问题吗?我该如何解决这个问题?

最佳答案

更改DEFAULT_FROM_EMAIL在您的设置中。该错误消息是因为您的电子邮件提供商不接受默认值 webmaster@localhost

关于django - SMTPDataError at/accounts/signup/(553, b'不允许作为 webmaster@localhost 进行中继'),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33401059/

相关文章:

Django 1.6 + AngularJS v1.2.6 + Amazon Aws

Django测验应用程序,REST,如何设计模型?

c# - 通过 SmtpClient 发送电子邮件抛出异常

java - 无法通过 centos VPS 上的 google smtp 发送电子邮件

python - Django Allauth - 在自定义注册 HTML 文件上应用注册功能

python - django-rest-auth:密码重置功能问题

python - 覆盖模板 django-allaut

python - Django 中的 CSS 表格样式未显示表格设计

Django ORM,排除两个值

c# - 使用 Gmail 设置发送电子邮件时出现问题