I am trying to use Google Calendar API to create event and invite multiple attendees.
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);
Everything works fine. The event is getting created with all attendees. But Email notifications are not getting sent. What am I doing wrong here?