2013-07-29 69 views
1

我想使「點擊這裏」一個超鏈接,當點擊時,會發送人爲127.0.0.1例如。超鏈接發送到電子郵件的Django的文本

confirm_links = 'To confirm this order <a href= "127.0.0.1://confirmorder/" > click here </a> ' 

我認爲這通常會工作,但我有通過電子郵件發送代碼。

+0

檢查上面的鏈接 - 基本上,你可以設計模板,你所希望的方式.. – karthikr

回答

-1
from django.core.mail import send_mail 

send_mail('Subject here', 'Here is the message.', '[email protected]', 
    ['[email protected]'], fail_silently=False) 

你要這樣呢?

<a href="mailto:[email protected]?Subject=Hello%20again" target="_top"> 
+0

https://docs.djangoproject.com/en/dev/topics/email/ – thumbtackthief

+0

我已經得到了這個代碼實現。它已經向用戶發送了一封電子郵件。我試圖弄清楚如何通過電子郵件發送文本作爲超鏈接激活。 – Mdjon26

+0

錯誤。我希望能讓文本的主體超鏈接。不是標題 – Mdjon26