简体   繁体   中英

Google Calendar API for .Net: Email notifications not sent when creating calendar event

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.

Here is a code snippet:

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

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

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?

try with this:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM