.Net的Google Calendar API:创建日历事件时未发送电子邮件通知

问题描述:

我正在使用Windows服务,该服务使用Google Calendar API v3创建和删除日历事件.我的代码正在运行,但是在创建新事件时,电子邮件通知永远不会发送给被邀请者.这些事件仅显示在其日历上.

I'm working on a windows service that uses the Google Calendar API v3 to create and delete calendar events. My code is working, but when creating new events, email notifications never get sent to the invitees. The events just show up on their calendar.

这是一个代码段:

EventsResource.InsertRequest insertRequest = new EventsResource.InsertRequest(calendarService, eventRequest, calendarID);
insertRequest.SendNotifications = true;
var response = insertRequest.Execute();

我已经测试过使用Google Calendar API资源管理器使用相同的身份验证凭据来创建相同的事件:

I have tested creating the same events using the same authentication credentials using the Google Calendar API explorer:

https://developers.google. com/google-apps/calendar/v3/reference/events/insert#try-it

当我使用该表单创建活动时,可以正确发送电子邮件通知,因此我认为这不是Google方面的配置或身份验证问题.我开始认为这是.Net的Google API中的错误(我使用的是最新版本-1.8.1.95).我将SendNotification属性设置为true,但是也许没有将其添加到发出的实际请求中?

When I create the event using that form, email notifications are sent out correctly, so I don't think it's a configuration or authentication problem on the Google side. I'm starting to think this is a bug in the Google API for .Net (I'm using the latest version - 1.8.1.95). I'm setting SendNotification property to true, but maybe it's not getting added to the actual request that goes out?

还有其他人遇到这个问题吗?

Anyone else having this problem?

尝试以下操作:

Event EventNew = new Event();
/*Complete the event*/
EventNew.Summary = "test";
EventNew.Description = ....
EventNew. ......

 EventsResource.InsertRequest request = CalendarioGoogle.Events.Insert(EventNew,calendarID);

request.SendNotifications = true;


/*In this case result is a Event*/
result = request.Execute();