作者:kafei | 来源:互联网 | 2023-09-06 19:10
我正在为用户帐户使用django allauth。创建帐户后,它会成功告诉我它将向该地址发送一封电子邮件以进行验证。但是我没有收到这封电子邮件。
这是我的设置。py:
EMAIL_CONFIRMATION_SIGNUP = True
accOUNT_EMAIL_REQUIRED = True
accOUNT_EMAIL_VERIFICATION = "mandatory"
LOGIN_REDIRECT_URL = '/'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'my@gmail.com'
EMAIL_HOST_PASSWORD = 'password'
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'