Google Calendar Not Sending Email RSVP to My ICS File - icalendar

I am attempting to send a meeting invite to both a user using outlook and a user using google calendar. In both cases, the ICS is recognized as a valid meeting request. In both cases I see the "accept/yes", "tentative/maybe", "decline/no" buttons as expected.
When the recipient clicks one of these buttons in Outlook, I receive the RSVP email back to me as expected and the event is added to the Outlook user's calendar (also as expected).
HOWEVER, when the google calendar recipient clicks on one of these buttons the event IS inserted into his/her calendar BUT no RSVP email is ever sent back to me.
NOTE: I am including a SENT-BY on the organizer but simplifying this does not change the problem.
The ICS file is as follows:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//My oncall calendar application//test.com
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:America/New_York
BEGIN:STANDARD
DTSTART;VALUE=DATE-TIME:20181104T020000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART;VALUE=DATE-TIME:20180311T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
SUMMARY:Meeting Time!
DTSTART;TZID=America/New_York;VALUE=DATE-TIME:20181022T142300
DTEND;TZID=America/New_York;VALUE=DATE-TIME:20181022T152300
DTSTAMP;VALUE=DATE-TIME:20181022T182300Z
UID:0.8860563089422712
SEQUENCE:0
ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;ROLE=REQ-PARTICIPANT:outlook_user#corpville.com
ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;ROLE=REQ-PARTICIPANT:gmail_user#gmail.com
CLASS:PUBLIC
CREATED;VALUE=DATE-TIME:20181003T115542Z
DESCRIPTION:Go online to update.
LOCATION:my desk
ORGANIZER;SENT-BY="mailto:no-reply#somewhereelse.io":MAILTO:me#example.com
PRIORITY:5
STATUS:CONFIRMED
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:Reminder
TRIGGER;RELATED=START:-PT1H
END:VALARM
END:VEVENT
END:VCALENDAR
The email msg is here:
Content-Type: multipart/alternative; boundary="===============8900875677198681530=="
MIME-Version: 1.0
Subject: Meeting Time!
From: My Mailer <no-reply#somewhereelse.io>
reply-to: me#example.com
To: outlook_user#corpville.com,gmail_user#gmail.com
--===============8900875677198681530==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Go online to update.
--===============8900875677198681530==
Content-Type: text/calendar; method="REQUEST"; name="invite.ics"; charset="UTF-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Description: invite.ics
Filename: invite.ics
Path: invite.ics
QkVHSU46VkNBTEVOREFSDQpWRVJTSU9OOjIuMA0KUFJPRElEOi0vL015IG9uY2FsbCBjYWxlbmRh
ciBhcHBsaWNhdGlvbi8vdGVzdC5jb20NCk1FVEhPRDpSRVFVRVNUDQpCRUdJTjpWVElNRVpPTkUN
ClRaSUQ6QW1lcmljYS9OZXdfWW9yaw0KQkVHSU46U1RBTkRBUkQNCkRUU1RBUlQ7VkFMVUU9REFU
RS1USU1FOjIwMTgxMTA0VDAyMDAwMA0KVFpPRkZTRVRGUk9NOi0wNDAwDQpUWk9GRlNFVFRPOi0w
NTAwDQpFTkQ6U1RBTkRBUkQNCkJFR0lOOkRBWUxJR0hUDQpEVFNUQVJUO1ZBTFVFPURBVEUtVElN
RToyMDE4MDMxMVQwMjAwMDANClRaT0ZGU0VURlJPTTotMDUwMA0KVFpPRkZTRVRUTzotMDQwMA0K
RU5EOkRBWUxJR0hUDQpFTkQ6VlRJTUVaT05FDQpCRUdJTjpWRVZFTlQNClNVTU1BUlk6QmxvY2tl
ZCBmb3IgRnJpZW5kc0ZpbmRUaW1lDQpEVFNUQVJUO1RaSUQ9QW1lcmljYS9OZXdfWW9yaztWQUxV
RT1EQVRFLVRJTUU6MjAxODEwMjJUMTQyMzAwDQpEVEVORDtUWklEPUFtZXJpY2EvTmV3X1lvcms7
VkFMVUU9REFURS1USU1FOjIwMTgxMDIyVDE1MjMwMA0KRFRTVEFNUDtWQUxVRT1EQVRFLVRJTUU6
MjAxODEwMjJUMTgyMzAwWg0KVUlEOjAuODg2MDU2MzA4OTQyMjcxMg0KU0VRVUVOQ0U6MA0KQVRU
RU5ERUU7UEFSVFNUQVQ9TkVFRFMtQUNUSU9OO1JTVlA9VFJVRTtST0xFPVJFUS1QQVJUSUNJUEFO
VDprZXl0b24ud2Vpc3NpbmdlckB0YXlsb3Jjb21tdW5pY2F0aW9ucy5jb20NCkFUVEVOREVFO1BB
UlRTVEFUPU5FRURTLUFDVElPTjtSU1ZQPVRSVUU7Uk9MRT1SRVEtUEFSVElDSVBBTlQ6ZmZ0dGVz
dGNvbnRhY3QzQGdtYWlsLmNvbQ0KQ0xBU1M6UFVCTElDDQpDUkVBVEVEO1ZBTFVFPURBVEUtVElN
RToyMDE4MTAwM1QxMTU1NDJaDQpERVNDUklQVElPTjpHbyBvbmxpbmUgdG8gdXBkYXRlLg0KTE9D
QVRJT046bXkgZGVzaw0KT1JHQU5JWkVSO1NFTlQtQlk9Im1haWx0bzpuby1yZXBseUBmcmllbmRz
ZmluZHRpbWUuaW8iOk1BSUxUTzprZXl0b25AZ21haWwuY29tDQpQUklPUklUWTo1DQpTVEFUVVM6
Q09ORklSTUVEDQpCRUdJTjpWQUxBUk0NCkFDVElPTjpESVNQTEFZDQpERVNDUklQVElPTjpSZW1p
bmRlcg0KVFJJR0dFUjtSRUxBVEVEPVNUQVJUOi1QVDFIDQpFTkQ6VkFMQVJNDQpFTkQ6VkVWRU5U
DQpFTkQ6VkNBTEVOREFSDQo=
--===============8900875677198681530==--

We also had the problem that Google Calendar does not send event invitation responses (RSVPs) to the inviting person from Microsoft Outlook/Exchange.
In our case, we discovered that all of the affected Outlook accounts have corresponding Google accounts associated with them, which are using the same email addresses as the Google accounts; i.e., registered on Google using the company's email address instead of a GMail address. GMail is not enabled for those accounts.
Google Calendar seems to be processing the responses from Google Calendar directly or internally, and does not send or forward the regular RSVP email response to the external / company email address.
We will check now
whether Google Calendar can be disabled for those Google accounts
whether Google Calendar has a setting to not mute/eat the RSVP responses or send CCs in all cases
whether enabling GMail for those Google accounts resolves the problem.

OK. I found my error. If you are using a GMail based email address for the organizer, it appears that Google Calendar will not send a RSVP reply unless it verifies that the email address did in fact create the google calendar. If you use an arbitrary email address (that you own, for example) then it sends it back no problem.

The can happen when the inviter's email address is associated with a Google Workspace Account and the invitee is using Gmail (regardless if it's personal or via Google Workspace). In this case, Google will prefer to internally process the RSVP (rather than send it out through the Internet) which then ends up in the wrong place.
In my case, because I (the inviter) no longer use Google Workspace for email and calendar, I simply turned off my Google Workspace account's Gmail and Calendar apps via admin.google.com > Apps > Google Workspace > Service Status.
After doing this, all RSVPs from all invitees (including invitees using Gmail), started making their way back to my non-Google-hosted calendar app.

Related

ics VALARM support across clients

I am wondering about the BEGIN:VALARM value in ics.
I have set an alarm, but Outlook (PC) and Calendar (Mac) seems to ignore the alarm altogether. In eM Client (PC) the alarm is set but cannot be dismissed (pops up again immediately after dismiss)
Is this a known problem with the iCalendar/ics standard?
The format seems to be valid. Are any additional values needed for each client to understand/accept and handle the alert correctly?
I am subscribing to the .ics file via a https:// URL.
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:adamgibbons/ics
METHOD:PUBLISH
X-PUBLISHED-TTL:PT1H
BEGIN:VEVENT
UID:-LovTg9y9HPDCHu8mVnD
SUMMARY:Purjolök
DTSTAMP:20191026T171500Z
DTSTART:20191024T080000Z
DESCRIPTION:En grönsak i lökfamiljen
URL:https://app.myapp.se/r/edit/-LovTg9y9HPDCHu8mVnD
STATUS:CONFIRMED
CATEGORIES:Matlista
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:En grönsak i lökfamiljen
TRIGGER:-PT10M
END:VALARM
DURATION:PT30M
END:VEVENT
END:VCALENDAR
There is most likely nothing wrong with your code and most clients will ignore those alarms by design.
Whether you receive an invitation via email or subscribe to a calendar via http, you don't want the organiser of the meeting/author of the calendar feed to dictate when/if you should be reminded. It is really up to the attendee/subscriber to set their own alarms.
If, on the other hand, you "import" the same ics file, the alarms will be taken into account (the client considers that the stream already belongs to you and that it is a "backup" of your own calendar).

Unable to delete appointment using the ical file in outlook desktop client

We have the following requirement.
1) We need to generate an appointment with recurrence pattern, and send it to attendees.
2) Later we need to update, delete single occurrence out of the recurrence pattern.
3) We may also need to delete the complete the recurrent appointment in some cases.
By delete, we mean the meeting should be marked as cancelled in the invitee's calendar.
We are sending the appointments via our web app sending an email to the attendees with .ICS file embedded in email. We are generating the email using Java Mail API and embedding the .ICS file as multipart message keeping the MIME type as text/calendar.
Our invitees are using Microsoft outlook Desktop Client, Office 365 Web client, gmail.
We are able to send the appointment with recurrence pattern, and also able to update the specific occurrence of the meeting.
However we are facing difficulty with deleting the appointment or individual meeting specifically in the Outlook Desktop Client. When we send the delete event, in the invitee's mail box, it shows the button as "Remove from calendar" but doesn't mark the meeting as "cancelled" in the user calendar. The same is happening correctly in the Gmail web app.
I have tested it on the Outlook Version shown below
Office 365 MSO(16.0.11601.20184) 64 bit
I also tested a simple test case of creating a simple meeting using the below create.ics file(sending it as part of the mail) and then trying to delete the meeting using the delete.ics file below.
//create.ics
BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
BEGIN:VTIMEZONE
TZID:India Standard Time
BEGIN:STANDARD
DTSTART:16010101T000000
TZOFFSETFROM:+0530
TZOFFSETTO:+0530
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T000000
TZOFFSETFROM:+0530
TZOFFSETTO:+0530
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ORGANIZER;CN=Test Sirion:MAILTO:xyz#abc.com
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Kapil Gupta:MAILTO:abc#xyz.com
DESCRIPTION;LANGUAGE=en-US:\n
UID:040000008200E00074C5B7101A82E00800000000908EB51F4E28D501000000000000000
01000000000ED265B41C38B479A5315D1D23383D4
SUMMARY;LANGUAGE=en-US:New Meeting
DTSTART;TZID=India Standard Time:20190622T080000
DTEND;TZID=India Standard Time:20190622T083000
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20190621T105648Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:0
LOCATION;LANGUAGE=en-US:
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-OWNERAPPTID:-2091554845
X-MICROSOFT-CDO-BUSYSTATUS:TENTATIVE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
X-MICROSOFT-DISALLOW-COUNTER:FALSE
X-MICROSOFT-LOCATIONS:[]
BEGIN:VALARM
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT15M
ACTION:DISPLAY
END:VALARM
END:VEVENT
END:VCALENDAR
//delete.ics
BEGIN:VCALENDAR
METHOD:CANCEL
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
BEGIN:VTIMEZONE
TZID:India Standard Time
BEGIN:STANDARD
DTSTART:16010101T000000
TZOFFSETFROM:+0530
TZOFFSETTO:+0530
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T000000
TZOFFSETFROM:+0530
TZOFFSETTO:+0530
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ORGANIZER;CN=Test Sirion:MAILTO:xyz#abc.com
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Kapil Gupta:MAILTO:abc#xyz.com
DESCRIPTION;LANGUAGE=en-US:\n
UID:040000008200E00074C5B7101A82E00800000000908EB51F4E28D501000000000000000
01000000000ED265B41C38B479A5315D1D23383D4
SUMMARY;LANGUAGE=en-US:Canceled: New Meeting
DTSTART;TZID=India Standard Time:20190622T080000
DTEND;TZID=India Standard Time:20190622T083000
CLASS:PUBLIC
PRIORITY:1
DTSTAMP:20190621T110026Z
TRANSP:TRANSPARENT
STATUS:CANCELLED
SEQUENCE:1
LOCATION;LANGUAGE=en-US:
X-MICROSOFT-CDO-APPT-SEQUENCE:1
X-MICROSOFT-CDO-OWNERAPPTID:-2091554845
X-MICROSOFT-CDO-BUSYSTATUS:FREE
X-MICROSOFT-CDO-INTENDEDSTATUS:FREE
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:2
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
X-MICROSOFT-DISALLOW-COUNTER:FALSE
END:VEVENT
END:VCALENDAR
Please let us know if there is any issue with the delete.ics file.
I have also put the code which we are using to send the mail in the below github gist, in case it is relevant.
https://gist.github.com/kapilgupta101292/92769d3e9f8e6444cb9dde5960473b1e
I have already tested by adding the X-WR-RELCALID as suggested in the following Stack overflow link but that doesn't work either -
Delete calendar event using iCalendar file import (Outlook 2003 problem)?
Please review the above ics file and let us know how to achieve the delete of the appointment.
Please let us know if any input is required, we need to quickly resolve this issue to deliver our webapp.

How to add/modify events in Google calendar with ICS file

I'm trying to create an ICS file to add events to a Google calendar via email. In the end, the calendar will be sent to multiple users, from a desktop app. Ideally I'd like to be able to modify the calendar if the events change (just event times, I'm ignoring cancelled events)
Here is my ICS file
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//MY COMPANY//Calendar//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
UID:shift-439-emp-128#mycompany.com
DTSTART:20180604T090000
DTEND:20180604T153000
DTSTAMP:20180519T081800
SUMMARY:Morning shfit
LOCATION:Morning Location
DESCRIPTION:Morning shift
END:VEVENT
BEGIN:VEVENT
UID:shift-446-emp-128#mycompany.com
DTSTART:20180605T153000
DTEND:20180605T233000
DTSTAMP:20180519T081800
SUMMARY:Night shift
LOCATION:
DESCRIPTION:Night
END:VEVENT
END:VCALENDAR
When I email that file to my gmail account, I can see a "Add to Google calendar" button which I can use to add the events to my prinary calendar.
Now, say the events times changed.
Question : How can I create a new ICS file with the new times so that existing events will be modified in google calendar?
I used UIDs for events so that google does not create duplicate entries. But when I email a second ics file with modified events (with uids), the "add to google calendar" button does not appear. If I try to manually import the ics file from google calendar Import feature, then I get this error message
Could not upload your events because you do not have sufficient access on the target calendar.
If I set different UIDs each time, the import process will work but duplicate entries will be created.
I also tried using REQUEST instead of PUBLISH method
Thanks
I was able to get this working with Gmail using the following:
METHOD: set to REQUEST
SEQUENCE: Set to 0 on first request and increment by 1 each time
ATTENDEE: Identify the Gmail user that is receiving the email by email address
Other variations would have non-desirable effects:
Only seeing 1 of the two events
Not updating existing event
Office 365 sends ICS files to Gmail that can be updated so it can be used to reference a commercial implementation. You can see the requests Outlook 365 sends by using "Show Original" in Gmail to retrieve the base64 encoded calendar body. Outlook 365 uses many other fields so it's instructive to examine.
I have a test script in Go using SparkPost so if you have any questions or would like to use it, just let me know. SparkPost has a free tier but you still need to configure your outbound sending domain to use it.
Here is an example modified request. I just increment the SEQUENCE and change the time to update the request in Gmail.
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//MY COMPANY//Calendar//EN
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE;ROLE=REQ-PARTICIPANT;CN=example#gmail.com:MAILTO:example#gmail.com
UID:shift-1807-emp-128#mycompany.com
DTSTART:20180807T010000
DTEND:20180807T020000
DTSTAMP:20180601T033455
SEQUENCE:0
SUMMARY:Morning shift
LOCATION:Morning Location
DESCRIPTION:Morning shift
END:VEVENT
BEGIN:VEVENT
ATTENDEE;ROLE=REQ-PARTICIPANT;CN=example#gmail.com:MAILTO:example#gmail.com
UID:shift-1808-emp-128#mycompany.com
DTSTART:20180807T130000
DTEND:20180807T140000
DTSTAMP:20180601T033455
SEQUENCE:0
SUMMARY:Night shift
LOCATION:Night Location
DESCRIPTION:Night
END:VEVENT
END:VCALENDAR
Of note, when sending multiple events in a single ICS file, sometimes it takes Gmail a second or so to show both events with the correct time in my testing.

SMTP MAIL FROM: being received as DATA: From?

I'm writing a recreational email spoofing app with several safeguards to make the app useless to spammers and other malicious people. One of these safeguards is that the app requires the user to send emails from the user's own SMTP account. The app is supposed to use this "login#smtp.example.com" for the MAIL FROM command. The From: field visible to the user is supposed to be spoofedAddress#example.com. I'm using Apache Commons Net SMTP. Here are relevant code fragments.
AuthenticatingSMTPClient client = new AuthenticatingSMTPClient();
....
client.auth(AuthenticatingSMTPClient.AUTH_METHOD.LOGIN, "login#smtp.example.com", "password");
....
client.setSender("login#smtp.example.com");
....
SimpleSMTPHeader header = new SimpleSMTPHeader("spoofedAddress#example.com", "Addressee#example.com", "Subject");
....
When the email arrives in my inbox, it displays "login#smtp.example.com" in the both the From: field and the envelope. "spoofedAddress#example.com" is nowhere to be seen. I used Log.e("SendMail", header.toString()); to show me the header produced by my app and it was correct. It appears that my email client is ignoring my header in favour of the envelope.
Solution
My SMTP server was intrusively editing the From: field. When I told my app to connect to a different SMTP server, "spoofedAddress#example.com" appeared in the received email's From: field.

Cancelling an iPhone calendar event from an ics email attachment

I'm creating an email that contains a VCalendar event in it's body. This displays as an ics attachment in the email of my iPhone 4 (IOS v5.1.1 9B206).
I can open this attachment and add the event to my iPhone calendar by clicking the "Add to Calendar" button.
Now, I'm trying to cancel events the same way.
I'm generating the same UID as the original event (based on the date and time of the event), setting Method to CANCEL and Status to CANCELLED (as recommended), however, although I can see the ics attachment in the email, I cannot open the attachment on my iPhone.
ics being sent:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//mycompany.com//test
METHOD:CANCEL
BEGIN:VEVENT
CLASS:PRIVATE
UID:20120924T090000
DTSTAMP:20120923T151052
DTSTART:20120924T090000
DTEND:20120924T130000
LOCATION:Normal
DESCRIPTION:Always a description
STATUS:CANCELLED
SUMMARY:Cancelling
ORGANIZER;CN="Test":mailto:donotreply#test.com
ATTENDEE;CN="Mr Smith":mailto:mr.smith#test.com
PRIORITY:5
SEQUENCE:2
END:VEVENT
END:VCALENDAR
UPDATE:
This actually works on my 1st generation iPad (IOS 5.1.1 9B206), so I'm now thinking it's because my iPhone doesn't have my exchange calendar.
UPDATE 2:
I've eventually managed to get my Exchange calendar syncing to my iPhone by re-entering the name of the email server, this re-validated/refreshed the details and now all my Outlook appointments sync.
Adding and cancelling an appointment on iPhone from an ics email attachment both work as long as everything is set up correctly.
You can add an appointment to any calendar (I was adding them to my local calendar).
You cannot cancel an appointment from a local calendar, I needed to synch my Exchange calendar to my iPhone to allow me to cancel events that I'd added.