从 item.cc_recipients exchangelib 获取 email_address

Get email_address's from item.cc_recipients exchangelib

我想我一直在寻找有效的解决方案

 print(item.cc_recipients)

我得到了结果:

[Mailbox(name='xxx1@gmail.com', email_address='xxx1@gmail.com', routing_type='SMTP', mailbox_type='OneOff', item_id=None), Mailbox(name='xxxx xxxx', email_address='xxx.xxx@xx.xx.com', routing_type='SMTP', mailbox_type='Mailbox', item_id=None)]

但我想下载一个只有电子邮件地址的列表?有快速解决方案吗?

item.cc_recipients returns Mailbox 项列表。 Mailbox 项具有 email_address 属性。要将 cc_recipients 转换为电子邮件地址列表,请执行以下操作:

print([m.email_address for m in item.cc_recipients])