我有一个在登台服务器上正常工作的电子邮件表单,但在本地却不行。在
我收到这个错误:
SMTPRecipientsRefused at /submit-foo/
{'': (555, '5.5.2 Syntax error. y4sm50402qad.14 - gsmtp')}
我读了Python's documentation on the SMTPRecipientsRefused error:
All recipient addresses refused. The errors for each recipient are accessible through the attribute recipients, which is a dictionary of exactly the same sort as SMTP.sendmail() returns.
我需要做些什么来解决这个问题?在
“gsmtp”位可能会告诉我这是Gmail的SMTP服务器的问题,这是我在localhost中设置的。不过,从shell发出的基本sendmail可以正常工作。在
邮件未被发送,因为它缺少“收件人”电子邮件地址。我不应该这样做的。在
为它添加一个电子邮件地址使它按预期工作!在
在为Django使用djoser库时,我收到了一个几乎相同的错误“smtprecipientsreferects at/auth/register”
我发现clear this Stack Overflow reference555 5.5.2 Syntax error. gmail's smtp注意到“Google的SMTP要求您按照以下方式格式化电子邮件地址:Recipient Name”。解决方案是修改我的呼叫请求以包含有效的电子邮件:
^{pr2}$相关问题 更多 >
编程相关推荐