我正嘗試使用Google Calendar API創建活動並邀請多個與會者。Google Calendar API - sendNotifications不起作用
foreach($email_invite_arr as $item){
if($item){
$attendee = new Google_Service_Calendar_EventAttendee();
$attendee->setEmail($item);
$attendee_arr[]= $attendee;
}
}
$event->setAttendees($attendee_arr);
$optParams = Array(
'sendNotifications' => true,
'maxAttendees' => 10
);
$createdEvent = $service->events->insert('primary', $event, $optParams);
一切工作正常。該活動正在與所有與會者一起創建。但電子郵件通知沒有發送。我在這裏做錯了什麼?
電子郵件通知不發送過去創建的事件。此外,請檢查alertsOnRespondedEventsOnly它是否設置爲true或false(針對您嘗試插入事件的日曆)。如果這是「真」,那麼事件提醒將僅發送給用戶的回覆狀態爲「是」或「可能」的事件。 – SGC 2014-11-21 18:54:21