首页 > 解决方案 > SMTPAuthenticationError: (535, 'Authentication failed: account disabled') Python app

问题描述

我的 Python 应用程序使用 Heroku 上的 sendgird 帐户在用户忘记密码或通过链接登录时为用户发送电子邮件。问题是 sendgrid 帐户,使用 get disable 1-2 个月后,我必须更改为新帐户。

完整日志:

错误:回溯(最后一次调用):
文件“user_profile/services/profile.py”,第 595 行,在 send_mail_with_perm
msg.send(fail_silently=fail_silently)
文件“/app/.heroku/python/lib/python2.7/ site-packages/django/core/mail/message.py”,第 292 行,在发送
返回 self.get_connection(fail_silently).send_messages([self])
文件“/app/.heroku/python/lib/python2.7/ site-packages/email_log/backends.py”,第 27 行,在 send_messages
num_sent += message.send()
文件中“/app/.heroku/python/lib/python2.7/site-packages/django/core/mail/ message.py”,第 292 行,在发送中
返回 self.get_connection(fail_silently).send_messages([self])
文件“/app/.heroku/python/lib/python2.7/site-packages/django/core/mail/backends/smtp.py”,第 100 行,在 send_messages
new_conn_created = self.open()
文件“/app/ .heroku/python/lib/python2.7/site-packages/django/core/mail/backends/smtp.py”,第 67 行,在 open
self.connection.login(self.username, self.password)
文件中“/ app/.heroku/python/lib/python2.7/smtplib.py",第 623 行,在登录中
引发 SMTPAuthenticationError(code, resp)
SMTPAuthenticationError: (535, 'Authentication failed: account disabled')

有人遇到同样的问题吗?

标签: pythondjangoherokusendgrid

解决方案


您可能有试用订阅,如果您不注册实际帐户,该订阅将被取消(一层是免费的,但可能需要您提供付款信息)。要么,要么你一再违反他们的服务/用户协议条款。


推荐阅读