django-allauth:电子邮件确认
django-allauth: email confirmation
我已经设置了 django-allauth 并在新用户注册时使用电子邮件确认,效果很好
但是在确认邮件中,我得到
Hello from example.com!
You're receiving this e-mail because user abc13 at example.com has given yours as an e-mail address to connect their account.
To confirm this is correct, go to http://<mysite>.com/accounts/confirm-email/q3rknxpflshgwddlbjw6aqzlr1ayqtnfrtezucoq2ysmfbm2etcldusq5dyrcoap/
Thank you from example.com!
example.com
如何用我的网站名称替换 "example.com"?
谢谢
听起来您需要更新 Django 管理中的 Site 条目。您可以在以下位置访问:
http://<yoursite>.com/admin/sites/site/
您还可以使用以下内容创建完全自定义的电子邮件:
@receiver(user_signed_up)
def user_signed_up_(sender,request,user,**kwargs):
subject, from_email, to = 'Welcome', 'admin@mysite', 'person@somewhere'
text_content ="some custom text or html"
msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
msg.attach_alternative(html_content, "text/html")
msg.send()
我已经设置了 django-allauth 并在新用户注册时使用电子邮件确认,效果很好
但是在确认邮件中,我得到
Hello from example.com!
You're receiving this e-mail because user abc13 at example.com has given yours as an e-mail address to connect their account.
To confirm this is correct, go to http://<mysite>.com/accounts/confirm-email/q3rknxpflshgwddlbjw6aqzlr1ayqtnfrtezucoq2ysmfbm2etcldusq5dyrcoap/
Thank you from example.com!
example.com
如何用我的网站名称替换 "example.com"?
谢谢
听起来您需要更新 Django 管理中的 Site 条目。您可以在以下位置访问:
http://<yoursite>.com/admin/sites/site/
您还可以使用以下内容创建完全自定义的电子邮件:
@receiver(user_signed_up)
def user_signed_up_(sender,request,user,**kwargs):
subject, from_email, to = 'Welcome', 'admin@mysite', 'person@somewhere'
text_content ="some custom text or html"
msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
msg.attach_alternative(html_content, "text/html")
msg.send()