I use the calendar.events.insert API to add an event to my calendar through the PHP client. The event is correctly entered along with the corresponding values ββset by the API. However, it cannot initiate an email invitation to participants. I looked around and found that the request should set the sendNotifications parameter to true . The same doesn't seem to help.
Here is a sample code:
var request = gapi.client.calendar.events.insert({ "calendarId" : calendarData.id, "sendNotifications": true, "end": { "dateTime": eventData.endTime }, "start": { "dateTime": eventData.startTime }, "summary": eventData.eventName, "attendees": jQuery.map(eventData.attendees, function(a) { return {'email' : a}; }), "reminders": { "useDefault": false, "overrides": [ { "method": "email", "minutes": 15 }, { "method": "popup", "minutes": 15 } ] } });
If eventData and calendarData are appropriate objects.
Although my main problem is sending emails for the first time, I also tried (as seen above) to set a reminder (using overrides ). Although the popup works as expected, I also did not receive an email update in this case.
This makes me wonder if this might be a resolution problem - is there something I need to enable for my application (it would be clear to the user to find out if my application sends emails on their behalf)?
source share