2016-03-16 129 views
0

我已經設置了Django的allauth和使用電子郵件確認時,新用戶註冊,工作正常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」替換爲我的網站名稱?

感謝

回答

2

這聽起來像你需要更新Django管理的Site條目。您可以訪問此:

http://<yoursite>.com/admin/sites/site/ 
+0

感謝你,成功了! – ealeon

1

您也可以創建一個完全自定義的電子郵件的東西,如:

@receiver(user_signed_up) 
def user_signed_up_(sender,request,user,**kwargs): 

    subject, from_email, to = 'Welcome', '[email protected]', '[email protected]' 
    text_content ="some custom text or html" 
    msg = EmailMultiAlternatives(subject, text_content, from_email, [to]) 
    msg.attach_alternative(html_content, "text/html") 
    msg.send() 
+0

這個函數在哪裏去? – ealeon

+0

app/models.py工程 – charlie6411

+0

如果你這樣做,你將需要在settings.py下禁用默認電子郵件 – charlie6411