我有来自 Django-registration 应用程序的代码。
def send_activation_email(self, email):
email = email
ctx_dict = { 'activation_key' : self.activation_key,
'expiration_days': settings.ACCOUNT_ACTIVATION_DAYS,
}
subject = render_to_string('activation_email_subject.txt', ctx_dict)
subject = ''.join(subject.splitlines())
message = render_to_string('activation_email.txt', ctx_dict)
send_mail(subject, message, 'gccFishing.com', [email], fail_silently = False)
里面activation_email.txt
是这样的:这是身体
到控制台的输出电子邮件是这样的:
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: this is the subject
From: gccFishing.com
To: ipad@ap.com
Date: Sun, 01 Sep 2013 20:39:04 -0000
Message-ID: <20130901203904.3048.2540@hammad-P5QL-E>
this is the body
- 存储在哪里
ctx_dict
? - 如何访问
ctx_dict
以检查激活密钥是否已发送? ctx_dict
客户端单击链接 后如何返回服务器?