views.py发送电子邮件到BCC和CC中的django
if 'send_email' in request.POST:
subject, from_email, to = 'Parent Incident Notification',user.email, person.parent_email
html_content = render_to_string('incident/print.html',{'person':person,
'report':report,
})
text_content = strip_tags(html_content)
msg = EmailMultiAlternatives(subject, text_content, settings.DEFAULT_FROM_EMAIL, [to])
msg.attach_alternative(html_content, "text/html")
msg.send()
以上是发送email.By这样我可以与邮件一起发送HTML内容的视图,它是发送电子邮件至[我]想再做一个密送和cc。我通过Emailmessage objects
在docs.I不知道如何包括密件抄送和抄送改变我的意见。
需要帮助。
感谢