Search code examples
outlookgmailicalendar

Event invite results in Gmail displaying two events to add to gcal


I'm generating an email that contains an event in ICS format, that I want both Gmail and Outlook to recognize. As I've seen elsewhere, it consists of a multi/mixed message. Within that, there's a multi/alt with text/plain, text/html and text/calendar parts. And a final application/ics part. Gmail recognizes this and puts up the 'Add to Google Calendar' button, but it thinks there are two identical events. I understand that the final application/ics part is for Outlook, but it appears to cause the duplicate. What am I missing?

Here's an example message:

Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="001643911600085117750003319898"

--001643911600085117750003319898
Content-Type: multipart/alternative; boundary="yabbadabbadoo"

--yabbadabbadoo
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

This is my plain text part


--yabbadabbadoo
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

This is my HTML part

--yabbadabbadoo
Content-Type: text/calendar; charset=UTF-8; method=PUBLISH
Content-Transfer-Encoding: quoted-printable

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Groups.io Inc//Groups.io Calendar//EN
METHOD:PUBLISH
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:[email protected]
DTSTAMP:20150318T225646Z
DTSTART:20150321T000000Z
DTEND:20150321T010000Z
SUMMARY:test 6
DESCRIPTION:5-7pm pacific time
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:test 6
TRIGGER:-PT5H
END:VALARM
END:VEVENT
END:VCALENDAR

--yabbadabbadoo--


--001643911600085117750003319898
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="invite.ics"
Content-Type: application/ics; name="invite.ics"

QkVHSU46VkNBTEVOREFSClZFUlNJT046Mi4wClBST0RJRDotLy9Hcm91cHMuaW8gSW5jLy9Hcm91
cHMuaW8gQ2FsZW5kYXIvL0VOCk1FVEhPRDpQVUJMSVNICkNBTFNDQUxFOkdSRUdPUklBTgpCRUdJ
TjpWRVZFTlQKVUlEOmNhbGVuZGFyLjEwQGdyb3Vwcy5pbwpEVFNUQU1QOjIwMTUwMzE4VDIyNTY0
NloKU1VNTUFSWTp0ZXN0IDYKRFRTVEFSVDoyMDE1MDMyMVQwMDAwMDBaCkRURU5EOjIwMTUwMzIx
VDAxMDAwMFoKREVTQ1JJUFRJT046NS03cG0gcGFjaWZpYyB0aW1lCkJFR0lOOlZBTEFSTQpBQ1RJ
T046RElTUExBWQpERVNDUklQVElPTjp0ZXN0IDYKVFJJR0dFUjotUFQ1SApFTkQ6VkFMQVJNCkVO
RDpWRVZFTlQKRU5EOlZDQUxFTkRBUg==


--001643911600085117750003319898--

Solution

  • I was missing an ORGANIZER field in the ICS file. Once I added that, Gmail no longer displayed a duplicate event.