Outlook不在电子邮件正文中显示ical RSVP按钮

时间:2018-05-13 23:34:32

标签: email outlook coldfusion calendar icalendar

Outlook 2016或Outlook 365无法识别附加的ics文件。 rsvp按钮未显示在电子邮件正文中,但它在gmail中正确显示。我可以下载ics文件并将其导入Outlook。

BEGIN:VCALENDAR
PRODID:-//AroFlo PtyLtd
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
UID:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzY2hlZHVsZV9pZCI6MCwic2NoZWRUe
 XBlIjoiZXZlbnQiLCJncm91cGlkIjoxLCJvcmdfaWQiOjEzNywiU1ZBUk1DT05UUk9MSUQiOjM
 xMTQ5LCJ1c2VyX2lkIjo3MTk1LCJ3b3JrcmVxdWVzdF9pZCI6MCwiZXZlbnRfaWQiOjU3MTUsI
 mFsbG9jYXRpb25faWQiOjAsImNvbnRyb2xsaW5nb3JnaWQiOjEzNywidGVtcGxhdGVfaWQiOjA
 sInRzX2dyb3VwX2lkIjowfQ.lVNWzJe1VbKsxdRJ2kCpLFUo2Wb1CqJ5Eom1nTgyewc
DTSTAMP:20180513T230757Z
DTSTART:20180514T050000Z
DTEND:20180514T073000Z
ORGANIZER;CN=Bri-Tech:mailto:test@email.com
CREATED:20180513T230757Z
LAST-MODIFIED:20180513T230757Z
SEQUENCE:0
SUMMARY:test event
DESCRIPTION:
X-ALT-DESC;FMTTYPE=text/html:
STATUS:CONFIRMED
TRANSP:OPAQUE
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP
 =TRUE;CN=test user;X-NUM-GUESTS=0:mailto:test1@test.com
PRIORITY:5
CLASS:PUBLIC
CATEGORIES:AroFlo, event
END:VEVENT
END:VCALENDAR

以下是如何构建MIME电子邮件类型

var m = new mail();
    m.setSubject( 'event' );
    m.setTo( test@email.com );
    m.setFrom( "noreply@email.com" );
    m.addPart( type="text/calendar", body="#icalFile#");
    m.addParam( type="text/calendar", file="invite.ics", content="#icalFile#");
    m.send();

1 个答案:

答案 0 :(得分:1)

原来没有正确添加电子邮件MIME类型。下面的代码现在正确显示RSVP按钮。

在ColdFusion中,addParam()类型可以设置多个参数。

m.addParam( type="text/calendar; charset=utf-8; method=REQUEST;"
           , file="invite.ics"
           , content="#icalFile#");