php - ics file not reflected in outlook calendar -
i trying send meeting invite php code, sending meeting invite through ics file. ics file coming in attachment in gmail not being reflected in ms outlook.
this following file format have:
begin:vcalendar prodid:-//microsoft corporation//outlook 10.0 mimedir//en version:2.0 method:request x-ms-olk-forceinspectoropen:true begin:vevent attendee;cn=mail@veershubhranshu.com;rsvp=true:mailto:mail@veershubhranshu.com attendee;cn=srivastav.veer@gmail.com;rsvp=true:mailto:srivastav.veer@gmail.com attendee;cn=veer@veershubhranshu.com;rsvp=true:mailto:veer@veershubhranshu.com class:public created:20140626t005704z description:when: thursday\, june 26\, 2014 10:00 am-10:30 (utc-08:00) p acific time (us & canada).\nwhere: nowhere\n\nnote: gmt offset above d oes not reflect daylight saving time adjustments.\n\n*~*~*~*~*~*~*~*~*~*\n \nsdcsdascsdcs\n dtend:20140626t173000z dtstamp:20140626t005704z dtstart:20140626t170000z last-modified:20140626t005704z location:nowhere organizer;cn="veer shubhranshu shrivastav":mailto:mail.@veershubhranshu.com priority:5 sequence:0 summary;language=en-us:test meeting transp:opaque uid:040000008200e00074c5b7101a82e00800000000e02849df9e90cf01000000000000000 010000000d1cc646a48a62440a0d2308d1f4960aa x-alt-desc;fmttype=text/html:<!doctype html public "-//w3c//dtd html 3.2//e n">\n<html>\n<head>\n<meta name="generator" content="ms exchange server ve rsion 08.00.0681.000">\n<title></title>\n</head>\n<body>\n<!-- converted f rom text/rtf format -->\n\n<p dir=ltr><span lang="en-us"><font face="calib ri">when: thursday\, june 26\, 2014 10:00 am-10:30 (utc-08:00) pacific time (us &\; canada).</font></span></p>\n\n<p dir=ltr><span lang="en-us "><font face="calibri">where: nowhere</font></span></p>\n\n<p dir=ltr><spa n lang="en-us"><font face="calibri">note: gmt offset above not re flect daylight saving time adjustments.</font></span></p>\n\n<p dir=ltr><s pan lang="en-us"><font face="calibri">*~*~*~*~*~*~*~*~*~*</font></span></p >\n\n<p dir=ltr><span lang="en-us"><font face="calibri">sdcsdascsdcs</font ></span><span lang="en-us"></span></p>\n\n</body>\n</html> x-microsoft-cdo-busystatus:tentative x-microsoft-cdo-importance:1 x-microsoft-cdo-intendedstatus:busy x-microsoft-disallow-counter:false x-ms-olk-allowexterncheck:true x-ms-olk-autostartcheck:false x-ms-olk-conftype:0 x-ms-olk-sender;cn="veer shubhranshu shrivastav":mailto:mail@veershubhranshu.com begin:valarm trigger:-pt15m action:display description:reminder end:valarm end:vevent end:vcalendar
i not able figure out problem. php code
<?php $domain = 'xyz.com'; //create email headers $mime_boundary = "----meeting booking----".md5(time()); $headers = "from: ".$from_name." <".$from_address.">\n"; $headers .= "reply-to: ".$from_name." <".$from_address.">\n"; $headers .= "mime-version: 1.0\n"; $headers .= "content-type: multipart/alternative; boundary=\"$mime_boundary\"\n"; $headers .= "content-class: urn:content-classes:calendarmessage\n"; //create email body (html) $message = "--$mime_boundary\r\n"; $message .= "content-type: text/html; charset=utf-8\n"; $message .= "content-transfer-encoding: 8bit\n\n"; $message .= "<html>\n"; $message .= "<body>\n"; $message .= '<p>dear '.$to_name.',</p>'; $message .= '<p>'.$description.'</p>'; $message .= "</body>\n"; $message .= "</html>\n"; $message .= "--$mime_boundary\r\n"; $ical = 'begin:vcalendar' . "\r\n" . 'prodid:-//microsoft corporation//outlook 10.0 mimedir//en' . "\r\n" . 'version:2.0' . "\r\n" . 'method:request' . "\r\n" . 'x-ms-olk-forceinspectoropen:true'."\r\n". 'begin:vevent'."\r\n". 'attendee;cn=mail@veershubhranshu.com;rsvp=true:mailto:mail@veershubhranshu.com'."\r\n". 'attendee;cn=srivastav.veer@gmail.com;rsvp=true:mailto:srivastav.veer@gmail.com'."\r\n". 'attendee;cn=veer@veershubhranshu.com;rsvp=true:mailto:veer@veershubhranshu.com'."\r\n". 'class:public'."\r\n". 'created:20140626t005704z'."\r\n". 'description:when: thursday\, june 26\, 2014 10:00 am-10:30 (utc-08:00) p acific time (us & canada).\nwhere: nowhere\n\nnote: gmt offset above d oes not reflect daylight saving time adjustments.\n\n*~*~*~*~*~*~*~*~*~*\n \nsdcsdascsdcs\n'."\r\n". 'dtend:20140626t173000z'."\r\n". 'dtstamp:20140626t005704z'."\r\n". 'dtstart:20140626t170000z'."\r\n". 'last-modified:20140626t005704z'."\r\n". 'location:nowhere'."\r\n". 'organizer;cn="veer shubhranshu shrivastav":mailto:mail.@veershubhranshu.com'."\r\n". 'priority:5'."\r\n". 'sequence:0'."\r\n". 'summary;language=en-us:test meeting'."\r\n". 'transp:opaque'."\r\n". 'uid:040000008200e00074c5b7101a82e00800000000e02849df9e90cf01000000000000000 010000000d1cc646a48a62440a0d2308d1f4960aa'."\r\n". 'x-alt-desc;fmttype=text/html:<!doctype html public "-//w3c//dtd html 3.2//e n">\n<html>\n<head>\n<meta name="generator" content="ms exchange server ve rsion 08.00.0681.000">\n<title></title>\n</head>\n<body>\n<!-- converted f rom text/rtf format -->\n\n<p dir=ltr><span lang="en-us"><font face="calib ri">when: thursday\, june 26\, 2014 10:00 am-10:30 (utc-08:00) pacific time (us &\; canada).</font></span></p>\n\n<p dir=ltr><span lang="en-us "><font face="calibri">where: nowhere</font></span></p>\n\n<p dir=ltr><spa n lang="en-us"><font face="calibri">note: gmt offset above not re flect daylight saving time adjustments.</font></span></p>\n\n<p dir=ltr><s pan lang="en-us"><font face="calibri">*~*~*~*~*~*~*~*~*~*</font></span></p >\n\n<p dir=ltr><span lang="en-us"><font face="calibri">sdcsdascsdcs</font ></span><span lang="en-us"></span></p>\n\n</body>\n</html>'."\r\n". 'x-microsoft-cdo-busystatus:tentative'."\r\n". 'x-microsoft-cdo-importance:1'."\r\n". 'x-microsoft-cdo-intendedstatus:busy'."\r\n". 'x-microsoft-disallow-counter:false'."\r\n". 'x-ms-olk-allowexterncheck:true'."\r\n". 'x-ms-olk-autostartcheck:false'."\r\n". 'x-ms-olk-conftype:0'."\r\n". 'x-ms-olk-sender;cn="veer shubhranshu shrivastav":mailto:mail@veershubhranshu.com'."\r\n". 'begin:valarm'."\r\n". 'trigger:-pt15m'."\r\n". 'action:display'."\r\n". 'description:reminder'."\r\n". 'end:valarm'."\r\n". 'end:vevent'."\r\n". 'end:vcalendar'."\r\n"; $message .= 'content-type: text/calendar;name="veer-invite.ics";method=request\n'; $message .= "content-transfer-encoding: 8bit\n\n"; $message .= $ical; $mailsent = mail($to_address, $subject, $message, $headers); ?>
there's great investigation of problem in this open issue in phpmailer. though it's not problem of phpmailer's making (it's outlook's fault), there's no easy way build workaround in phpmailer - may better off usig different system build mime structure, such zend_mime.
Comments
Post a Comment