0
votes

When I insert an event into Google Calendar using the Java API on Android, the event gets created, but the attendees do not get an invitation email, even though send notifications is set to true.

final Event event = new Event()
    .setSummary(topic)
    .setStart(new EventDateTime().setDateTime(startTime).setTimeZone(timezone))
    .setEnd(new EventDateTime().setDateTime(endTime).setTimeZone(timezone))
    .setAttendees(Arrays.asList(new EventAttendee().setEmail(inviteeEmail), new EventAttendee().setEmail(hostEmail)))
    .setOrganizer(new Event.Organizer().setEmail(hostEmail))
    .setHangoutLink(null);
try {
    final Event insertedEvent = getCalendarService(googleAccountCredential).events().insert(CALENDAR_PRIMARY, event)
             .setSendNotifications(true).setOauthToken(googleAccountCredential.getToken()).execute();
    return insertedEvent.getId();
} catch (final Exception e) {

I have tried the suggestions listed in similar questions to no avail. Are there any conditions under which an invitation e-mail would not be sent?

UPDATE: emails go out when the invitee is in the same Google for Work domain as the sender, but not when they are not (for example [email protected] inviting [email protected], joe does not get an invitation email)

1

1 Answers

1
votes

You may want to try the resolution given in G Suite Administrator Help,

To make sure you receive notifications for new, changed, or canceled invitations, you need to update your default notification settings. See Customize your notifications.

Furthermore:

With Google Calendar you can customize how and when you receive notifications. You can customize your notifications for new, changed, and canceled invitations. You can also customize your settings for invitation replies.

For instructions, see Change your default notification settings.

Additional information can also be found in Receiving notifications.

Lastly, if those still doesn't work, you may want to also check this Google forum with concern to event invites not being sent. Or, you may also log encountered issues here.