python - smtpauthenticationerror 534 django python 注册

标签 python django email heroku django-registration

我知道这个问题被问了很多次,但我的情况有点不同。我正在部署我的 django 应用程序,在 heroku 上实现了 django-registration-redux。注册在本地机器上工作正常,但它在 heroku 上给出 smtpauthenticationerror 534。

我在我的谷歌账户上允许了安全性较低的应用,但错误仍然存​​在。

我点击了 DisplayUnlockCaptcha按钮继续 - 仍然不起作用。

这里是settings.py的相关部分:

EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'example@gmail.com'
EMAIL_HOST_PASSWORD = 'password'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = 'domain <example@gmail.com>'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

最佳答案

Google 似乎禁止使用其帐户自动发送电子邮件。在这种情况下,最好的选择就是使用其他服务或创建电子邮件服务 by yourself

关于python - smtpauthenticationerror 534 django python 注册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38385026/

相关文章:

PHP - 允许的内存大小 134217728 字节已耗尽

java - Play 框架是否附带电子邮件模板库或工具?

Python 日志记录在 2.5 和 2.6 之间不兼容

python -/lib64/libc.so.6 : version `GLIBC_2.14' not found - error from the application build using pyinstaller

python - python opencv imread间歇性地在macOS上返回None

python - 使用 lineplot 使用 seaborn 绘制两条线

django - 禁止(403)CSRF验证失败。请求中止

django - 为什么 Django 不允许我在页面中包含静态内容

django - 将多次南方移民压缩为一次移民

ruby-on-rails-3 - 如果 :to field has a comma,则 ActionMailer 无法正确发送电子邮件