我已经安排了一个现有的日历事件
我正在尝试向现有事件添加大量电子邮件,但当我运行此功能时,它会添加一个新事件
我需要能够:找到活动,将指定的电子邮件添加到活动中,添加电子邮件以获得邀请
(我是python新手,所以请不要苛刻地评判)
def updateInvite(pEmail,pSubj,iY, iM, iD, iHH, iMM):
pytz_tz = pytz.timezone('America/New_York')
tz = EWSTimeZone.localzone()
items = account.calendar.view(
start=tz.localize(EWSDateTime(iY, iM, iD, iHH, iMM)),
end=tz.localize(EWSDateTime(iY, iM, iD, iHH + 2, iMM)),
)`
for item in items:
sEventSubj = item.subject
item.save(update_fields=['required_attendees'])
通过调用
pEmail = 'name.last@company.com'
sSubj = 'Invite Test Meeting with Teams link'
iY = 2020
iD = 29
iM = 4
iHH = 16
iMM = 30
updateInvite(pEmail, sSubj, iY, iM, iD, iHH, iMM)
为此,请使用项目附件。找到要附加到日历项目的邮件,并为其创建项目附件:
相关问题 更多 >
编程相关推荐