【问题标题】:.ics invitation calendar not working in outlook.com issue.ics 邀请日历在 Outlook.com 问题中不起作用
【发布时间】:2015-11-29 07:08:21
【问题描述】:

嗨,我正在使用 cakephp 电子邮件发送附有 .ics 日历的电子邮件,问题是确认按钮在 yahoo 和 gmail 中完美显示,但在 outlook.com 中没有。 这是 .ics 文件的示例:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//T//T//EN
METHOD:REQUEST
BEGIN:VEVENT
UID:20150830T184133-19847-domain.com
DTSTAMP:20150830T184133
DTSTART:20150812T000000Z
DTEND:20150818T000000Z
ORGANIZER;CN=myteam:MAILTO:admin@myteam.org
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=brabrick@hotmail.com:MAILTO:brabrick@hotmail.com
LOCATION:new york
SUMMARY:Madrid
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR

这是我创建约会 .ics 文件的 php 代码:

                $vcal = "BEGIN:VCALENDAR\r\n";
                $vcal .= "VERSION:2.0\r\n";
                $vcal .= "PRODID:-//T//T//EN\r\n";
                $vcal .= "METHOD:REQUEST\r\n";
                $vcal .= "BEGIN:VEVENT\r\n";


                $vcal .= "UID:".date('Ymd').'T'.date('His')."-".rand()."-domain.com\r\n";
                $vcal .= "DTSTAMP:".date('Ymd').'T'.date('His')."\r\n";
                $vcal .= "DTSTART:$visitedate\r\n";
                $vcal .= "DTEND:$visitedate\r\n";             
                $vcal       .=  "ORGANIZER;CN=myteam:MAILTO:admin@myteam.org\r\n";//j'ai ajouté cette ligne
                $vcal       .= "ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=$mail[$iduser]:MAILTO:$mail[$iduser]\r\n";
                //$vcal .= "DTEND:$end\r\n";
                if ($loc != "") $vcal .= "LOCATION:$loc\r\n";
                $vcal .= "SUMMARY:$objet\r\n";
                $vcal .= "BEGIN:VALARM\r\n";
                $vcal .= "TRIGGER:-PT15M\r\n";
                $vcal .= "ACTION:DISPLAY\r\n";
                $vcal .= "DESCRIPTION:Reminder\r\n";
                $vcal .= "END:VALARM\r\n";
                $vcal .= "END:VEVENT\r\n";
                $vcal .= "END:VCALENDAR\r\n";


                $headers = "\r\nMIME-version: 1.0\r\nContent-Type: text/calendar; method=REQUEST; charset=\"iso-8859-1\"";
                $headers .= "\r\nContent-Disposition: attachment; filename=\"appointment.ics\"";
                $headers .= "\r\nContent-Transfer-Encoding: 7bit\r\nX-Mailer: Microsoft Office Outlook 12.0";


                $Email = new CakeEmail('smtp');
                $Email->to($mail);
                $Email->subject($objet);
                $Email->replyTo('admin@myteam.org');
                $Email->from ('admin@myteam.org');
                $Email->setHeaders(array($headers));

提前致谢

【问题讨论】:

    标签: php cakephp calendar outlook icalendar


    【解决方案1】:

    您的 ics 文件看起来不错,因此问题很可能与您的电子邮件 MIME 结构有关。看看Multipart email with text and calendar: Outlook doesn't recognize ics

    【讨论】:

    • .ics 已被识别,它显示为文件下载,就像带有 .ics 扩展名的普通文件一样,所以我认为这是 vcalendar 中的问题??
    • 没有。请看另一篇文章。客户对您的电子邮件的结构(MIME 内容类型)非常敏感。
    • oki 只是一个问题,outlook.com 是否应该配置为显示 vcalendar,因为它发生在我的 gmail 中,我必须先将它与 google 议程同步,然后才能在电子邮件中显示 icalendar??
    • 您的意思是说您的outlook.com 日历帐户应该链接到您的outlook.com 邮件帐户?我认为这是outlook.com的默认设置
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-11-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-26
    • 1970-01-01
    相关资源
    最近更新 更多