I'm trying to create a client that can accept a meeting invitation using ActiveSync. I have the meetingresponse over ActiveSync working, but when I send the confirmation email to the organizer and attach the iCalendar formatted reply, it doesn't get parsed out by the server as it should. Instead, it's converted to an attachment and the users attendee status never gets updated.
Here's the MIME email I'm sending:
From: t@xxx.ca
To: Tester Testing <test@xxx.ca>
Message-ID: <i8swl8yv.-4t2@-1387408011.xxx.ca>
Subject: Accepted: Test 11:36 Wed
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_0_1114661696.1429717004439"
------=_Part_0_1114661696.1429717004439
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
these are forced comments
------=_Part_0_1114661696.1429717004439
Content-Type: text/calendar; method=REPLY; charset=utf-8; name=meeting.ics
Content-Transfer-Encoding: quoted-printable
BEGIN:VCALENDAR
METHOD:REPLY
PRODID:XXXEmail
VERSION:2.0
BEGIN:VEVENT
ATTENDEE;PARTSTAT=ACCEPTED:MAILTO:t@xxx.ca
ORGANIZER:MAILTO:test@xxx.ca
DTSTART:20150422T120000
DTEND:20150422T123000
DTSTAMP:20150422T113625
LOCATION;LANGUAGE=en-US:here
UID:3D6D7B89-DE7E-45A1-B916-19DEDB2B1ADC
CLASS:PUBLIC
STATUS:CONFIRMED
TRANSP:OPAQUE
PRIORITY:5
SEQUENCE:0
END:VEVENT
END:VCALENDAR
------=_Part_0_1114661696.1429717004439--
Does anyone see an issue with the iCalendar Reply? Or how the mime is formatted? Or any ideas why this won't work?
EDIT: As requested, here's an example MIME email that was correctly parsed on the server:
Content-Type: multipart/alternative; boundary="===============0124021817=="
X-Client-ID: 57
X-Mailer: BlackBerry Email (10.3.1.2576)
Message-ID: <20150422140519.5439570.43618.57@xxx.ca>
Date: Wed, 22 Apr 2015 10:05:19 -0400
Subject: Accepted: test at 10:04 Wed
From: <t@xxx.ca>
To: <test@xxx.ca>
MIME-Version: 1.0
--===============0124021817==
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Commment
--===============0124021817==
Content-Type: text/calendar; charset="utf-8"; name="meeting.ics"; method=REPLY
Content-Transfer-Encoding: quoted-printable
BEGIN:VCALENDAR
PRODID:-//Research In Motion//RIM App//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REPLY
BEGIN:VTIMEZONE
TZID:America/New_York
BEGIN:STANDARD
DTSTART:20071104T020000
RRULE:FREQ=3DYEARLY;BYDAY=3D1SU;BYMONTH=3D11
TZNAME:EST
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20070311T020000
RRULE:FREQ=3DYEARLY;BYDAY=3D2SU;BYMONTH=3D3
TZNAME:EDT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ATTENDEE;RSVP=3DTRUE;ROLE=3DREQ-PARTICIPANT;CN=3DTest Test;PARTSTAT=3DACCE=
PTED:mailto:
t@xxx.ca
COMMENT:Commment
CREATED:20150422T140505Z
DTEND;TZID=3DAmerica/New_York:20150422T110000
DTSTAMP:20150422T140518Z
DTSTART;TZID=3DAmerica/New_York:20150422T103000
LOCATION:here
ORGANIZER;CN=3DTesting Tester:mailto:test@xxx.ca
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:test at 10:04 Wed
TRANSP:OPAQUE
UID:A885C120-ABAD-4418-AB24-8B93E57194F0
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:test at 10:04 Wed in 15 minutes.
TRIGGER;RELATED=3DSTART:-PT15M
X-WR-ALARMUID:9b758290-e8f8-11e4-afff-b57e838ad0c3
END:VALARM
END:VEVENT
END:VCALENDAR
--===============0124021817==--
I've tried including the timezone information and it still didn't work. I have another email program that also accepts meeting invites properly, and my iCalendar attachment is basically identical to theirs (they base64 encode the iCalendar attachment which I've also tried with no luck).
When using a different MIME writer (this one came from Android open source project), the vCalendar content I'm sending it interpreted and parsed correctly. I can't see any differences in the MIME format though (besides it being Base64 encoded which I tried and didn't work)...?
Date: Mon, 27 Apr 2015 14:22:43 -0400
Subject: Accepted: test event Monday 2:22
Message-ID: <i907pyoo.17vp@-1387408011.xxx.ca>
From: t@xxx.ca
To: "Tester Testing" <test@xxx.ca>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary=" _com.android.email_7881218929099440"
----_com.android.email_7881218929099440
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
----_com.android.email_7881218929099440
Content-Type: text/calendar;
name="meeting.ics"
Content-Transfer-Encoding: base64
QkVHSU46VkNBTEVOREFSDQpNRVRIT0Q6UkVQTFkNClBST0RJRDpYWFhFbWFpbA0KVkVSU0lPTjoyLjANCkJFR0lOOlZFVkVOVA0KVUlEOkFGQzMyNURELTk1MjYtNENFRS05MTlBLUI4RkIxQzU1RTBCQw0KQVRURU5ERUU7UEFSVFNUQVQ9QUNDRVBURUQ6TUFJTFRPOnRAeHh4LmNhDQpPUkdBTklaRVI6TUFJTFRPOnRlc3RAeHh4LmNhDQpEVFNUQVJUOjIwMTUwNDI3VDE0MzAwMA0KRFRFTkQ6MjAxNTA0MjdUMTUwMDAwDQpEVFNUQU1QOjIwMTUwNDI3VDE0MjIzMQ0KTE9DQVRJT047TEFOR1VBR0U9ZW4tVVM6aGVyZQ0KQ0xBU1M6UFVCTElDDQpTVEFUVVM6Q09ORklSTUVEDQpUUkFOU1A6T1BBUVVFDQpQUklPUklUWTo1DQpTRVFVRU5DRTowDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVOREFS
----_com.android.email_7881218929099440--