iCalendar脚本在outlook中呈现为html

New to Calendar script, Below is my iCalendar script which is valid when checked in Icalendar and Gmail app perfectly detects it.But issue is with Outlook and apple default mail app where it will render as HTML in the mail body.

The script is generated in CakePHP 2.X and sent as an email.

$message = "BEGIN:VCALENDAR
";
$message .= "PRODID:-//My//Prod MIMEDIR//EN
";
$message .= "VERSION:2.0
";
$message .= "METHOD:PUBLISH
";
$message .= "BEGIN:VEVENT
";
$message .= 'ORGANIZER;CN="Test":test@example.com'."
";
$message .= "UID:20190530T180000-456543
";
$message .= "DTEND:20190530T190000Z
";
$message .= "DTSTAMP:".date('Ymd').'T'.date("His")."
";
$message .= "DTSTART:20190530T180000Z
";
$message .= "SUMMARY;LANGUAGE=en-us:Event Description
";
$message .= "DESCRIPTION:Test DESCRIPTION
";
$message .= "END:VEVENT
";
$message .= "END:VCALENDAR
";

$Email = new CakeEmail();
$Email->from(INFO_EMAIL)
->to('test@outlook.com')
->setHeaders(array("Content-Type" => "text/calendar; method=PUBLISH; charset=UTF-8","Content-Disposition" => "inline; filename=filename.ics"))
->subject('Subject')
->send($message);
echo "Script";
exit;

Apologies, please redirect me if the question is repeated. Any help here will be appreciated. enter image description here

duanquyong8164
duanquyong8164 这个答案帮助了我的内容类型,现在它在outlook中可见,因为附件和outlook[Web]正在为它提供预览。outlookandroid移动应用程序仍然没有显示附加的.ics文件。stackoverflow.com/questions/21812438/...
一年多之前 回复
doute7910
doute7910 我实际上是指消息的源代码,即主题被添加到主题后的$Email内容->主题('主题')
一年多之前 回复
duanhuokuang5280
duanhuokuang5280 Markus,用输出屏幕截图更新了问题。
一年多之前 回复
doushu8260
doushu8260 发送的邮件主体是什么?
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问