我们需要通知我们的客户即将到来的约会。所以我向他们发送 iCalendar 邀请,以便在他们的日历中创建约会。iCalendar 邀请示例如下所示。
BEGIN:VCALENDAR
PRODID:-//NONSGML Scheduler//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
TRANSP:OPAQUE
BEGIN:VEVENT
DTSTAMP:20160504T235656Z
DTSTART;TZID=America/New_York:20160509T090000
DTEND;TZID=America/New_York:20160509T100000
SUMMARY:Appointment with Terrance
CREATED:20160504T235655Z
LAST-MODIFIED:20160504T235655Z
DTSTAMP:20160504T235656Z
UID:appointment-101@gmail.com
TZID:America/New_York
SEQUENCE:0
LOCATION:Sunset blvd.\, Brooklyn\, NY 11203
ORGANIZER;CN=Barrimore:MAILTO:mailer@gmail.com
ATTENDEE;CN=Barrimore;ROLE=REQ-PARTICIPANT;RSVP=FALSE;PARTSTAT=ACCEPTED;CUTYPE=INDIVIDUAL:mailto:aleh......@gmail.com
STATUS:CONFIRMED
X-ALT-DESC;FMTTYPE=text/html:<html><body>Barrimore,<br><br>An appointment with Terrance was recently created or updated by you or your staff.<br><br>You can see your updated calendar by signing in at: <a href="https://localhost">https://localhost</a>.<br><br>For help signing in or general support issues, please email support@gmail.com.<br><br>Thank you.</body></html>
END:VEVENT
END:VCALENDAR
所以问题是 GMail 不显示 X-ALT-DESC 参数的 html 内容。很好奇,Hotmail 一切正常 - 它显示带有“接受”、“忽略”按钮和来自 X-ALT-DESC 的格式化 html 消息的事件面板。GMail 仅显示事件信息面板。