如何向注册 django 应用程序(使用 django-allauth)的用户发送欢迎电子邮件。如果我设置ACCOUNT_EMAIL_VERIFICATION = ("mandatory")
,它工作正常,并且用户会收到一封验证电子邮件。但是由于我不需要任何电子邮件验证,所以用户应该简单地注册并收到一封欢迎电子邮件。
settings.py-
ACCOUNT_AUTHENTICATION_METHOD = ("email")
ACCOUNT_EMAIL_VERIFICATION = ("none")
ACCOUNT_SIGNUP_PASSWORD_VERIFICATION = False
ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_USERNAME_REQUIRED = False
EMAIL_CONFIRMATION_SIGNUP = True
ACCOUNT_EMAIL_REQUIRED =True
LOGIN_REDIRECT_URL = '/'
LOGOUT_URL = '/'
ACCOUNT_LOGOUT_ON_GET =False
ACCOUNT_LOGOUT_REDIRECT_URL = '/'
SOCIALACCOUNT_QUERY_EMAIL = (ACCOUNT_EMAIL_REQUIRED)
SOCIALACCOUNT_AUTO_SIGNUP = True
SOCIALACCOUNT_AVATAR_SUPPORT = ( 'avatar' in INSTALLED_APPS)
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = '##'
EMAIL_HOST_PASSWORD = '##'
EMAIL_PORT = 587
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
我错过了发送欢迎注册邮件的任何设置吗?还是我必须通过我的观点来传递它?似乎无法弄清楚这一点。任何帮助都会很棒。谢谢。