iCalendar 不会为组织者创建活动 [英] iCalendar does not create an event for organizer

查看:22
本文介绍了iCalendar 不会为组织者创建活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 iCalendar 标准在我的 Microsoft Outlook 日历中创建一个事件.我已经从 .NET 应用程序向我的 Exchange 邮箱发送了一封内容类型为文本/日历"的电子邮件.它作为会议请求到达 Outlook.一切看起来都很好,直到我单击收到的会议请求时,Outlook 将其显示为空日历视图,文本为:在日历中找不到会议".我不明白为什么 - 我想创建一个事件,它试图找到一些现有的?

I’m trying to create an event in my Microsoft Outlook calendar by using iCalendar standard. I’ve sent an email with content type "text/calendar" to my Exchange mailbox from .NET application. It arrives to Outlook as an meeting request. Everything looks good, till the moment when I click the received meeting request, Outlook displays it as an empty calendar view with the text: "Meeting cannot be found in the calendar". I don’t understand why – I wanted to create an event and it is trying to find some existing?

如果我向除组织者之外的会议参与者发送完全相同的电子邮件,它会在他们的日历中创建一个事件,并且一切似乎都没有问题.我发现它是由ORGANIZER"属性引起的.如果设置为组织者的电子邮件(我的电子邮件)并且我向自己发送会议请求,则不会创建带有在日历中找不到会议"信息的事件.

If I send exactly the same email to whoever participant of the meeting except the organizer, it creates an event in their calendars and everything seems to be ok. I’ve found that it is caused by the "ORGANIZER" property. If it is set to organizer’s email (my email) and I send meeting request to myself, an event is not created with the information "Meeting cannot be found in the calendar".

那么问题是为什么它不为组织者创建活动?组织者必须创建该事件,以便其他参与者在接受或取消会议时通知他们.

So the question is why it doesn’t create an event for organizer? Organizer must have that event created to be notified by other participants if they have accepted or cancelled the meeting.

这是 iCalendar:

Here is the iCalendar:

BEGIN:VCALENDAR
PRODID:-//Company//Product 3.0//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20130225T200000Z
DTEND:20130225T203000Z
DTSTAMP:20130225T143039Z
ORGANIZER;CN="John Doe":mailto:john.doe@domain.com
UID:20130225T143039Z@domain.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSVP=TRUE;CN="John Smith"
 ;X-NUM-GUESTS=0:mailto:john.smith@domain.com
CLASS:PUBLIC
CREATED:20130225T143039Z
DESCRIPTION:
LAST-MODIFIED:20130225T143039Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Booking test
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

推荐答案

假设组织者想要为 2 个与会者创建一个会议.他在预订系统中填写表格.预订系统向自己和 2 位与会者发送包含 iCalendar 标准的电子邮件.

Let’s say that organizer want to create an meeting for 2 attendees. He fills in a form in the booking system. The booking system sends email containing iCalendar standard to himself and to 2 meeting attendees.

这个场景不起作用.

无法在组织者的日历中创建事件(可取消的会议对象).客户认为包含 iCalendar 格式的电子邮件只是通知与会者已在组织者日历中创建的会议.如果此类电子邮件到达组织者的邮箱,客户端应用程序不会在组织者的日历中创建事件.它假定活动是由组织者自己创建的.例如:在这种情况下,Outlook 会告诉您在日历中找不到会议".

It is not possible to create an event (cancellable meeting object) in the calendar of the organizer. The client thinks that email containing iCalendar format is just notification for attendee of the meeting already created in the organizer calendar. If such an email arrives to organizer’s mailbox, client app doesn’t create an event in the organizer’s calendar. It assumes that an event was created by organizer himself. E.g.: Outlook tells you in that case that "Meeting cannot be found in the calendar".

如果您询问 Microsoft 支持人员,他们只会告诉您他们不支持开放标准:http://support.microsoft.com/kb/2269506

If you ask Microsoft support about it, they only tell you that they does not support open standards: http://support.microsoft.com/kb/2269506

此问题的有效解决方案是使用平台服务(Exchange Web 服务Google Calendar API) 以在组织者的日历中创建活动.忘记 iCalendar 标准.这些服务可以配置为自动向与会者发送通知.因此,如果您使用 EWS,则传递SendInvitationsMode.SendToAllAndSaveCopy"就足够了:

Working solution to this problem is to use platform services (Exchange Web Services or Google Calendar API) to create an event in the organizer’s calendar. Forget iCalendar standard. The services can be configured for sending notifications to attendees automatically. So it is enough to pass "SendInvitationsMode.SendToAllAndSaveCopy" if you’re using EWS:

Appointment appointment = new Appointment(service);
appointment.Subject = "Status Meeting";
appointment.Body = "The purpose of this meeting is to discuss status.";
appointment.Start = new DateTime(2014, 3, 1, 9, 0, 0);
appointment.End = appointment.Start.AddHours(2);
appointment.Location = "Conf Room";
appointment.RequiredAttendees.Add("user1@contoso.com");
appointment.RequiredAttendees.Add("user2@contoso.com");
appointment.OptionalAttendees.Add("user3@contoso.com");  
appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

或将sendNotifications"参数设置为 true(如果是 Google Calendar API).

or set "sendNotifications" parameter to true in case of Google Calendar API.

您不需要向每个特定的与会者发送电子邮件.

You don’t need to send an email to every particular attendee.

这篇关于iCalendar 不会为组织者创建活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆