我创建了一个发送iCalendar活动邀请的PHP脚本(基于RFC 5545)。一切正常,但在iPhone(iOS 4.2.1)和iPad(iOS 5.1)上,我没有选择接受/拒绝事件(显示为mime-attachment.ics),只是将它添加到我的日历。在其他邮件客户端(outlook,thunderbird,gmail)中,这可以正常工作。
iOS'邮件客户端是否支持发送此类响应?如果是,是否有人知道我应该指定什么才能使其工作?
以下是ics文件的示例内容:
BEGIN:VCALENDAR
PRODID:-//Some organization//some application//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
UID:20120920T150350Z-70@http://localhost/www/
CREATED:20120920T150350Z
DTSTAMP:20120921T080800Z
DTSTART:20120921T080800Z
DTEND:20120922T060800Z
DESCRIPTION:Please attend this sample meeting
SUMMARY:Invitation to attend training
LOCATION:Earth
ATTENDEE;RSVP=TRUE:mailto:periklis@example.com
ORGANIZER;CN=periklis@example.com:mailto:periklis@example.com
LAST-MODIFIED:20120921T080800Z
PRIORITY:5
SEQUENCE:0
STATUS:CONFIRMED
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
答案 0 :(得分:3)
仔细阅读RFC之后,这就是我使用和工作的内容:
BEGIN:VCALENDAR
PRODID:-//Some organization//some application//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
UID:20120925T072912Z-140@http://localhost/www/
CREATED:20120925T072912Z
DTSTAMP:20120922T090500Z
DTSTART:20120922T090500Z
DTEND:20120923T090500Z
DESCRIPTION:Please attend this sample meeting
SUMMARY:Invitation to attend training
LOCATION:Earth
ATTENDEE;RSVP=TRUE:mailto:periklis@example.com
ORGANIZER;CN=periklis@example.com:mailto:periklis@example.com
LAST-MODIFIED:20120922T090500Z
PRIORITY:5
SEQUENCE:0
STATUS:CONFIRMED
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
还值得一提的是,上面的行必须用\ r \ n分隔。所以我将每一行分配给一个数组成员然后崩溃了数组:
$message[]='BEGIN:VCALENDAR';
$message[]='PRODID:-//Some organization//some application//EN';
[...]
$message[]='END:VCALENDAR';
$message = implode("\r\n", $message);