Vcalendar 在 Windows Outlook 中运行良好,但在 MAC Outlook 中无法运行。当我通过电子邮件收到预约时,它显示以下消息:
charset="UTF-8"
Content-Transfer-Encoding: 7bit
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
UID:UID:20120605T112338-532614004-testing
DTSTAMP:20120605T112338
DTSTART:20120605T112338
SUMMARY: Appointment testing
DESCRIPTION: Test appointment
END:VEVENT
END:VCALENDAR
这是我用于创建约会的代码:
$myUID="UID:".date('Ymd').'T'.date('His')."-".rand()."-test".$eol; // required by Outlok
$message="BEGIN:VCALENDAR".$eol;
$message.="VERSION:2.0".$eol;
//$message.="PRODID:-//Foobar Corporation//NONSGML Foobar//EN\n";
$message.="METHOD:REQUEST".$eol; // requied by Outlook
$message.="BEGIN:VEVENT".$eol;
$message.="UID:".$myUID; // required by Outlok
$message.="DTSTAMP:".date('Ymd').'T'.date('His').$eol; // required by Outlook
$message.="DTSTART:".date('Ymd').'T'.date('His').$eol;
$message.="SUMMARY: $attachment_subject".$eol;
$message.="DESCRIPTION: $notes".$eol;
$message.="END:VEVENT".$eol;
$message.="END:VCALENDAR".$eol;
$headers = "From: $User <$User_Email>".$eol;
$headers .= "MIME-Version: 1.0".$eol;
$headers .= "Content-Type: text/calendar; method=REQUEST;".$eol;
$headers .= 'charset="UTF-8"';
$headers .= $eol;
$headers .= "Content-Transfer-Encoding: 7bit";
mail("$Email", $subject, $message, $headers)