EmailMessage django cc作为密件抄送

EmailMessage django cc作为密件抄送,django,html-email,email-attachments,django-email,Django,Html Email,Email Attachments,Django Email,我正在使用EmailMessage类发送邮件,但遇到以下问题: People marked in Cc receiving mails as bcc 再现结果的最小代码如下所示: def send_mails(subject, html_message, sender_mail, recipient_list, bcc_list, cc_list, reply_to): headers = {'Cc': cc_list} email = EmailMessage(subject

我正在使用EmailMessage类发送邮件,但遇到以下问题:

People marked in Cc receiving mails as bcc
再现结果的最小代码如下所示:

def send_mails(subject, html_message, sender_mail, recipient_list, bcc_list, cc_list, reply_to):
    headers = {'Cc': cc_list}
    email = EmailMessage(subject, html_message, sender_mail,
                         recipient_list, bcc_list, reply_to=reply_to, headers=headers)

    email.content_subtype = 'html'
    email.send()
headers = {'Cc': ','.join(cc_list)}
另外,如果我在某些请求中没有获得诸如cc、bcc之类的字段,该如何处理


非常感谢您提供的任何帮助。

我必须在标题中传递Cc,如下所示:

def send_mails(subject, html_message, sender_mail, recipient_list, bcc_list, cc_list, reply_to):
    headers = {'Cc': cc_list}
    email = EmailMessage(subject, html_message, sender_mail,
                         recipient_list, bcc_list, reply_to=reply_to, headers=headers)

    email.content_subtype = 'html'
    email.send()
headers = {'Cc': ','.join(cc_list)}