2015-04-22 64 views
2

我正嘗試使用ActiveSync創建可以接受會議邀請的客戶端。我有ActiveSync工作的會議響應,但是當我將確認電子郵件發送到組織者並附加iCalendar格式化答覆時,它不會被服務器解析出來,因爲它應該如此。而是將其轉換爲附件,並且用戶參與者狀態永遠不會更新。未解析iCalendar會議響應

這裏的MIME電子郵件,我要送:

From: [email protected] 
To: Tester Testing <[email protected]> 
Message-ID: <[email protected]> 
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:[email protected] 
ORGANIZER:MAILTO:[email protected] 
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-- 

有誰看到一個問題與回覆的iCalendar?或者mime是如何格式化的?或者有什麼想法,爲什麼這不起作用?

編輯: 按照要求,這裏有一個例子MIME電子郵件這是正確的服務器上解析:

Content-Type: multipart/alternative; boundary="===============0124021817==" 
X-Client-ID: 57 
X-Mailer: BlackBerry Email (10.3.1.2576) 
Message-ID: <[email protected]> 
Date: Wed, 22 Apr 2015 10:05:19 -0400 
Subject: Accepted: test at 10:04 Wed 
From: <[email protected]> 
To: <[email protected]> 
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: 
[email protected] 
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:[email protected] 
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==-- 

我試過,包括時區信息,它仍然沒有工作。我有另一個電子郵件程序,也正確接受會議邀請,我的iCalendar附件與他們的基本相同(他們base64編碼iCalendar附件,我也試過沒有運氣)。

當使用不同的MIME書寫器(本書來自Android開源項目)時,我發送的vCalendar內容將被正確解釋和解析。雖然我看不出MIME格式有什麼不同(除了它是我試過並且沒有工作的Base64編碼)......?

Date: Mon, 27 Apr 2015 14:22:43 -0400 
Subject: Accepted: test event Monday 2:22 
Message-ID: <[email protected]> 
From: [email protected] 
To: "Tester Testing" <[email protected]> 
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-- 

回答

0

嘗試使用multipart/mixed代替multipart/alternative。

+0

感謝您的回覆,不幸的是我得到了同樣的東西。 .ics文件顯示爲附件,並且永遠不會被服務器分析。 – forevercrashed

+0

您是否有示例確認電子郵件,由另一個程序創建,確實可以通過服務器正確解析? –

+0

查看上面的原始問題,我已經編輯它包含一個示例MIME,按預期工作。 – forevercrashed