def __init__(self, subject, context=None, template=None, html_template=None,
body=None, html_body=None, headers=None, reference=None,
reply_reference=None, from_email=None):
assert not (body and template)
assert not (html_body and html_template)
assert context or not (template or html_template)
self.subject = subject
self.context = context or {}
self.template = template
self.html_template = html_template
self._txt_body = body
self._html_body = html_body
self.headers = headers
self.reference = reference # The object that generated this message
self.reply_reference = reply_reference # The object this message is replying about
self.from_email = from_email or settings.SERVER_EMAIL
self._send_to = set()
评论列表
文章目录