gpt4 book ai didi

office365 - Outlook 365 API - 创建日历事件时禁用自动发送电子邮件

转载 作者:行者123 更新时间:2023-12-03 23:56:25 25 4
gpt4 key购买 nike

我正在研究将 Gmail 日历事件迁移到 Outlook 365 的项目,过程是使用 Google Calendar API v3 导出 Gmail 日历事件,然后将其转换为兼容的 Outlook 事件 JSON,然后发布到 Outlook API,使用:

POST https://outlook.office.com/api/v2.0/me/events

https://msdn.microsoft.com/en-us/office/office365/api/calendar-rest-operations#create-events

我面临的问题是,当在 365 上创建事件时,它会自动向所有与会者发送电子邮件,无论是旧事件还是新事件。

至于迁移,这是非常糟糕的行为,迁移 500 个事件,每个事件有 3 个参与者,意味着发送 1500 封电子邮件。

我只想尽可能地创建静态事件,而不发送任何电子邮件等。

我也尝试添加 ResponseRequested=false属性(property),但它什么都不做。

这是一个有两个参与者的示例 JSON 正文:
{
"Body":{
"ContentType":"TEXT",
"Content":"Some text to show"
},
"Organizer":{
"EmailAddress":{
"Name":"Mr. User",
"Address":"user@domain.com"
}
},
"Subject":"MySubject",
"Attendees":[
{
"EmailAddress":{
"Name":"John Bon",
"Address":"John@bon.com"
},
"Status":{
"Response":"NotResponded"
}
},
{
"EmailAddress":{
"Name":"James Claims",
"Address":"James@Claims.com"
},
"Status":{
"Response":"Declined"
}
}
],
"Start":{
"DateTime":"2017-08-09T13:00:00+03:00",
"TimeZone":"Etc/GMT+2"
},
"End":{
"DateTime":"2017-08-09T14:00:00+03:00",
"TimeZone":"Etc/GMT+2"
},
"ResponseRequested":false
}

邮政 URI 是:
POST https://outlook.office.com/api/v2.0/users/user@domain.com/calendars/events"
Authorization: Bearer ya29.GoAB......

另外,如果我的方向不好,而你对如何完成我的任务有更好的想法,我会很高兴听到......

任何帮助深表感谢。

最佳答案

你可能想引用这个线程:

  • Allow calendar appointments to be created without inviting all Group members
  • Add or delete appointment or event on Group calendar in Outlook 2016 without sending email to group members. This is possible on 365 online.

  • 它建议了以下解决方法:
  • Uncheck盒子在 send invitation to the group .
  • 创建日历事件时,如果您设置了 StatusFreeReminderNone ,约会将设置在日历上,并且不会发送加入群组的邀请。
  • 设置参数 AlwaysSubscribeMembersToCalendarEvents False
  • 关于office365 - Outlook 365 API - 创建日历事件时禁用自动发送电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45671589/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com