def _send(self, **kwargs):
"""
Actually send email in background
:return:
"""
context = self._build_context(**kwargs)
plain, html = self._render(context)
msg = EmailMultiAlternatives(
from_email=self.from_email,
to=self.to,
body=plain,
subject=self.format_subject()
)
msg.attach_alternative(html, 'text/html')
msg.send()
评论列表
文章目录