[英]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()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.