通过Smtp发送iCalendar邀请

时间:2012-08-27 16:39:58

标签: smtp icalendar

我一直试图通过smtp发送iCalendar邀请函几天了。我正在使用DDay.iCal库来构建消息的iCalendar组件,而我正在使用一个或多或少的自行开发的smtp服务器来发送消息(不幸的是我暂时停留在这个解决方案中)。

我用几种不同的方式搞砸了,我没有运气。结果通常是收件人收到带有.ics附件的电子邮件。在outlook中,我可以打开附件并将其添加到我的日历中; gmail只会让我下载附件。它不会将其识别为日历邀请。

下面是我尝试过的一个场景的示例。有人可以告诉我它有什么问题或者需要做些什么来构建正确的日历邀请消息吗?

谢谢!

Delivered-To: jordan_test@gmail.com
Received: by 10.68.224.234 with SMTP id rf10csp257513pbc;
    Mon, 27 Aug 2012 09:16:44 -0700 (PDT)
Received: by 10.50.85.228 with SMTP id k4mr10905189igz.22.1346084204116;
    Mon, 27 Aug 2012 09:16:44 -0700 (PDT)
Return-Path: <283877=jordan_test=gmail.com@smtp.mycompany.com>
Received: from smtp.mycompany.com ([214.16.251.150])
    by mx.google.com with SMTP id cw2si32587704icc.106.2012.08.27.09.16.43;
    Mon, 27 Aug 2012 09:16:44 -0700 (PDT)
Received-SPF: neutral (google.com: 214.16.251.150 is neither permitted nor denied by domain of 283877=jordan_test=gmail.com@smtp.mycompany.com) client-ip=215.16.251.150;
Authentication-Results: mx.google.com; spf=neutral (google.com: 215.16.251.150 is neither permitted nor denied by domain of 283877=jordan_test=gmail.com@smtp.mycompany.com) smtp.mail=283877=jordan_test=gmail.com@smtp.mycompany.com
Date: Mon, 27 Aug 2012 16:16:43 GMT
X-Mailer: BlahCommunicationsServices 1.0.0, by BLAH Inc.
Subject: =?UTF-8?B?SGV5ISB0aGlzIGlzIGZvciB5b3Uu?=
From: <ical@return.mycompany.com>
To: <jordan_test@gmail.com>
Reply-To: <ical@return.mycompany.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
Content-Type: multipart/alternative;boundary="__=_Part_Boundary_1687780707_370337274"
Message-Id: <283877@smtp.mycompany.com>
References: <283877@smtp.mycompany.com>





--__=_Part_Boundary_1687780707_370337274
Content-Transfer-Encoding: 7bit
Content-Type: text/plain

test test test


--__=_Part_Boundary_1687780707_370337274
Content-Transfer-Encoding: 7bit
Content-Type: text/calendar;method=REQUEST;charset=utf-8

BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
PRODID:-//ddaysoftware.com//NONSGML DDay.iCal 1.0//EN
BEGIN:VEVENT
ATTENDEE;CN=Jordan;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CUTYPE=INDIVIDUAL;RSVP=TRUE:MAILTO:jordan@mycompany.com
ATTENDEE;CN=Jordan;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CUTYPE=INDIVIDUAL;RSVP=TRUE:MAILTO:jordan_test@gmail.com
DESCRIPTION:test test test
DTEND:20120828T130000
DTSTAMP:20120827T121642
DTSTART:20120828T120000
ORGANIZER:MAILTO:ical@return.mycompany.com
SEQUENCE:0
SUMMARY:Hey! this is for you.
UID:234434
END:VEVENT
BEGIN:VTIMEZONE
END:VTIMEZONE
END:VCALENDAR



--__=_Part_Boundary_1687780707_370337274--

0 个答案:

没有答案