ZOHO smtp SMTPAuthenticationError at / (535, 'Authentication Failed') Django app

纵然是瞬间 提交于 2019-12-01 13:34:12

Turns out I was registered under the European host of zoho so I fixed it by changing the EMAIL_HOST to 'smtp.zoho.eu'

This is the only setting I have in settings.py and it is enough to get it working.

#Email Settings
EMAIL_USE_SSL = True
EMAIL_HOST = 'smtp.zoho.com'
EMAIL_PORT = 465
EMAIL_HOST_USER = 'someone@example.com'
EMAIL_HOST_PASSWORD = 'yourpassword'
DEFAULT_FROM_EMAIL = 'someone@example.com'
SERVER_EMAIL = 'someone@example.com'

You can test it using the quick example from Django Docs.

from django.core.mail import send_mail

send_mail(
    'Subject here',
    'Here is the message.',
    'from@example.com',
    ['to@example.com'],
    fail_silently=False,
)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!