Django EmailMultiAlternatives有沒有一種方法,您可以發送到多個「到」地址,而無需再次發送?Django EmailMultiAlternatives發送到多個「到」地址
嘗試用逗號分隔電子郵件中的元組,但只有第一個收件人收到電子郵件。
Django EmailMultiAlternatives有沒有一種方法,您可以發送到多個「到」地址,而無需再次發送?Django EmailMultiAlternatives發送到多個「到」地址
嘗試用逗號分隔電子郵件中的元組,但只有第一個收件人收到電子郵件。
電子郵件地址列表應該有效,如the example in the Django docs所示。
to_emails = ['[email protected]', '[email protected]']
msg = EmailMultiAlternatives(subject, text_content, from_email, to_emails)
你可能想使用的bcc
代替to_emails
,以阻止用戶查看電子郵件的其他收件人。
msg = EmailMultiAlternatives(subject, text_content, from_email, bcc=to_emails)
你是否還檢查過其他收件人是否有效的電子郵件地址(沒有錯別字,不在垃圾郵件文件夾中等)? – 2012-04-11 11:10:08