更新到 sendgrid 的 python 客户端最新版本后,bcc 字段中的地址不再接收电子邮件。
这是用于发送邮件的代码:
headers = json.JSONEncoder().encode({'X-SMTPAPI' : headers.json_string()}) if headers else None
email = sendgrid.Mail(from_email=from_email,
from_name=from_name,
to=to_emails, # list of email addresses
cc=cc, # list of email addresses
bcc=bcc, # list of email addresses
subject=subject,
html=html,
text=text,
headers=headers)
github上有一个未解决的问题,但看起来没有任何进展:
https://github.com/sendgrid/sendgrid-python/issues/83
任何人都有不涉及使用非常旧版本的修复或解决方法?