0

我尝试以编程方式从约会中删除与会者并使用选项更新它SendOnlyToChanged。问题是所有与会者还会收到一封电子邮件,其中包含有关会议的更新,而不仅仅是更改。

appointmentOutlook.update( ConflictResolutionMode.AlwaysOverwrite,SendInvitationsOrCancellationsMode.SendOnlyToChanged );

我在交换服务器论坛上发现了同样的问题,但也没有成功

有人找到解决此问题的解决方案或解决方法吗?

4

2 回答 2

2

诀窍是使用ConflictResolutionMode.AutoResolve.

不要问我为什么它会这样工作,这是对一个比你最近的问题的回答

(所以我不会将任何一个答案标记为重复,而只是参考它)。

于 2015-07-22T11:31:01.783 回答
0

这是 Independentsoft 的 API 示例。管理员向 Mark、John 和 Peter 发送会议请求,并决定将 John 从会议中删除。

SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date startTime = dateFormat.parse("2013-01-03 18:00:00");
Date endTime = dateFormat.parse("2013-01-03 19:00:00");

Appointment appointment = new Appointment();
appointment.setSubject("Test15");
appointment.setBody(new Body("Body text."));
appointment.setStartTime(startTime);
appointment.setEndTime(endTime);
appointment.setLocation("Room 123");
appointment.setReminderIsSet(true);
appointment.setReminderMinutesBeforeStart(30);
appointment.getRequiredAttendees().add(new Attendee("Mark@mydomain3.com"));          
appointment.getRequiredAttendees().add(new Attendee("John@mydomain3.com"));
appointment.getRequiredAttendees().add(new Attendee("Peter@mydomain3.com"));

ItemId itemId = service.sendMeetingRequest(appointment);

//add first
ItemChange itemChange1 = new ItemChange(itemId);
itemChange1.getPropertiesToSet().add(new Property(AppointmentPropertyPath.REQUIRED_ATTENDEES, new Attendee("Mark@mydomain3.com")));

itemId = service.updateItem(itemChange1, SendMeetingOption.SEND_TO_CHANGED_AND_SAVE_COPY);

{ //add others non-removed in a loop

    ItemChange itemChange2 = new ItemChange(itemId);
    itemChange2.getPropertiesToAppend().add(new Property(AppointmentPropertyPath.REQUIRED_ATTENDEES, new Attendee("Peter@mydomain3.com")));

    itemId = service.updateItem(itemChange2, SendMeetingOption.SEND_TO_CHANGED_AND_SAVE_COPY);
}
于 2013-09-12T09:14:25.050 回答