ics附件未显示Outlook客户端中的rsvp按钮

时间:2017-10-20 05:53:01

标签: c# email outlook calendar icalendar

我在代码中发送了几封带日历邀请的电子邮件。虽然所有这些都在使用RSVP按钮的Gmail中很好地显示,但同样的电子邮件不会在Outlook客户端中显示任何按钮。

这是我创建ics文件的相关代码:

BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20180130T053000Z
DTEND:20180130T063000Z
DTSTAMP:20171020T054607
ORGANIZER;CN=noreply@goalenvision.com:mailto:noreply@goalenvision.com
UID:3880488702684ad0b09f08d517606797@goalenvision.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-
ACTION;RSVP=TRUE;CN=user123@gmail.com:mailto:user123@gmail.com
CREATED:20171020T054607Z
DESCRIPTION:
STATUS:CONFIRMED
SUMMARY:Management meeting - My Company Pvt. Ltd.
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

此处了解电子邮件在Outlook客户端中的显示方式

enter image description here

然后我尝试在Google日历中创建会议邀请以进一步调查问题,当我在Outlook客户端收到电子邮件时,它有RSVP按钮:

enter image description here

以下是谷歌日历中的ics文件:

BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20171021T030000Z
DTEND:20171021T040000Z
DTSTAMP:20171020T025616Z
ORGANIZER;CN=user123@gmail.com:mailto:mail.user123@gmail.com
UID:0lrrf4lfm9gpiku3gmfh214q7m@google.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE
;CN=user123@gmail.com;X-NUM-GUESTS=0:mailto:user123@gmail.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
TRUE;CN=user234@gmail.com;X-NUM-GUESTS=0:mailto:user234@gmail.com
CREATED:20171020T025616Z
DESCRIPTION:
LAST-MODIFIED:20171020T025616Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:GoalEnvision - Google
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

我无法理解为什么来自Google日历的电子邮件包含RSVP按钮,而我的应用程序生成的电子邮件虽然大多数相关字段都相同/包含在两个ics文件中。任何指针都会有所帮助!

2 个答案:

答案 0 :(得分:0)

答案很可能不在于您的ics文件,而在于您发送的MIME结构。有关如何构建MIME消息的详细信息,请参阅Multipart email with text and calendar: Outlook doesn't recognize ics

答案 1 :(得分:0)

如果我理解正确您的应用未启动收件人的回复 - 原因是邮件状态设置为defaultConfig { applicationId "parking.automated_parking.com.parkingsystem" minSdkVersion 19 targetSdkVersion 26 versionCode 1 versionName "1.0" multiDexEnabled true // ADD THIS LINE resConfigs "auto" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } 时应为PARTSTAT=ACCEPTED;