views.pyDjango में गुप्त प्रतिलिपि करने के लिए ईमेल और सीसी भेज
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 सामग्री भेज सकते हैं, यह करने के लिए ईमेल भेजने जाता है [ करने के लिए] अकेले पता, मैं एक और बीसीसी और सीसी भी बनाना चाहता हूं। मैं दस्तावेज़ों में Emailmessage objects
के माध्यम से चला गया। मुझे नहीं पता कि मेरे विचारों को बदलने के लिए बीसीसी और सीसी को कैसे शामिल किया जाए।
सहायता चाहिए।
धन्यवाद