简体   繁体   中英

Delete calendar event in google calendar ics file

I am creating calendar event ics file with PUBLISH method and sending that attachment in the email. When receiving in email there is option for adding event to Add to calendar which will add event in the calendar. For deleting calendar event i am sending delete calendar as an attachment in the email.

Code for creating calendar event

BEGIN:VCALENDAR
VERSION:2.0
PRODID://Company//Company Calendar 1.0//EN
METHOD:PUBLISH
BEGIN:VEVENT
UID:lAdYuWyFqwyopPjAAA123
DTSTAMP:2020-02-03T05:04:52.793ZZ
DTSTART;TZID=Asia/Calcutta:20200204T100000
DTEND;TZID=Asia/Calcutta:20200204T100000
SUMMARY:Play cricket
DESCRIPTION:Description of the event
SEQUENCE:0
CATEGORIES:Sports
ORGANIZER;CN=Admin:mailto:abc@test.com
END:VEVENT
END:VCALENDAR

Code for deleting calendar event

BEGIN:VCALENDAR
VERSION:2.0
PRODID://Company//Company Calendar 1.0//EN
METHOD:CANCEL
BEGIN:VEVENT
UID:lAdYuWyFqwyopPjAAA123
DTSTAMP:2020-02-03T05:04:52.793ZZ
DTSTART;TZID=Asia/Calcutta:20200204T100000
DTEND;TZID=Asia/Calcutta:20200204T100000
SUMMARY:Play cricket
DESCRIPTION:Description of the event
CATEGORIES:Sports
ORGANIZER;CN=Admin:mailto:abc@test.com
STATUS:CANCELLED
SEQUENCE:1
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

It is working when email is send in the outlook it is automatically cancelling the event when deleting event ics file is received in the email. It is striking the event in outlook calendar.

But when i am checking with gmail it is not removing event when delete event is received. After delete event is received in the email google calendar shows same event over there.

I only want to use PUBLISH method while creating event. Don't want use REQUEST method while creating event using ics file as it will create unnecessary RVSP option.

I have tried to keep sequence same that also didn't work. Even it tried adding X-WR-RELCALID this parameter even this was also not working.

尝试使用 METHOD:PUBLISH 但状态为:CANCELLED

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM