的iCalendar不会创建一个事件组织者组织者、创建一个、事件、iCalendar

2023-09-02 10:49:41 作者:倾城一世繁花落

我试图通过使用iCalendar标准建立在我的Microsoft Outlook日历事件。我从.NET应用程序发送的内容类型文本/日历的邮件到我的Exchange邮箱。 它到达Outlook作为一个会议请求。一切看起来不错,直到那一刻,当我点击接收会议要求,Outlook会显示它与文本的空日历视图:Meeting无法找到日历中的的。 我不明白为什么? - 我想创造一个事件,它正试图找到一些现有的

如果我把一模一样的电子邮件给任何人,除了主办单位的会议参加者,它会在他们的日历事件,一切都似乎是确定。 我发现,它是由组织者属性。如果它被设置为组织者的电子邮件(我的电子邮件)和我发送会议要求自己,一个事件是不是用信息会议无法找到日历中的创建。

所以,问题是为什么不创建一个事件的组织者?主办单位必须具有创建由其他参与者被通知该事件,如果他们接受或取消会议。

下面是的iCalendar:

  BEGIN:VCALENDAR
PRODID: -  //公司//产品3.0 // EN
版本:2.0
CALSCALE:GREGORIAN
方法:请求
BEGIN:VEVENT
DTSTART:20130225T200000Z
DTEND:20130225T203000Z
DTSTAMP:20130225T143039Z
主办单位; CN =李四:邮寄地址:john.doe@domain.com
UID:20130225T143039Z@domain.com
参会者; CUTYPE =个人; ROLE = REQ参与者; RSVP = TRUE; CN =约翰·史密斯
 X-NUM-来宾= 0:邮寄地址:john.smith@domain.com
类:public
创建:20130225T143039Z
描述:
最后修改:20130225T143039Z
位置:
顺序:0
状态:Confirmed
摘要:预订试验
TRANSP:不透明
END:VEVENT
END:VCALENDAR
 
这所学校出现一个新的神秘组织 成立时间不长,但是搞出来的的事情不少

解决方案

让我们说,组织者希望创建2与会者的会议。他填补了预订系统的形式。 该订票系统发送包含iCalendar标准电子邮件给自己和2与会者。

此情况下不能正常工作。

这是不可能建立在组织者的日历事件(撤销会议的对象)。客户认为包含iCalendar格式的电子邮件只是通知了组织者的日历已创建会议的与会者。如果这样的邮件到达组织者的邮箱,客户端应用程序不会创建组织者的日历事件。它假设一个事件是由组织者自己创造。例如:展望告诉你在这种情况下,说:Meeting无法找到日历中的

如果你问Microsoft支持一下吧,他们只告诉你,他们不支持开放标准: http://support.microsoft .COM / KB / 2269506

工作的解决这个问题的方法是使用平台服务( Exchange Web服务或谷歌日历API )创建于组织者的日历中的事件。忘记iCalendar标准。 这些服务可以被配置为自动地发送通知给与会者。 因此,它是足以通过 SendInvitationsMode.SendToAllAndSaveCopy 的如果你使用EWS:

 预约预约=新的任命(服务);
appointment.Subject =状态会议;
appointment.Body =本次会议的目的是讨论状态。
appointment.Start =新的日期时间(2014年3,1,9,0,0);
appointment.End = appointment.Start.AddHours(2);
appointment.Location =CONF室;
appointment.RequiredAttendees.Add(user1@contoso.com);
appointment.RequiredAttendees.Add(user2@contoso.com);
appointment.OptionalAttendees.Add(user3@contoso.com);
appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);
 

或者设置的 sendNotifications 的参数设置为true的情况下,谷歌日历API。

您不必发送电子邮件到每一个特定的与会者。

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?

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.

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

解决方案

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.

This scenario doesn’t work.

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".

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

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);

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

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