How to add members to a distribution list in exchange2010 using python exchangelib? Any other library available to perform these tasks?
问问题
135 次
1 回答
0
“另外请帮助我获取 Exchange Server 2010 中的 DL 列表”=> 见下文,获取分发列表成员的代码。
def get_distro_emails(dist_list):
credentials = Credentials('username', os.environ.get('password'))
account = Account('someone@company.com', credentials=credentials, autodiscover=True)
emails = []
try:
for mailbox in account.protocol.expand_dl(dist_list):
emails.append(mailbox.email_address)
except Exception as e:
print(str(e))
return emails
于 2021-08-11T21:02:15.263 回答