I have a piece of code that looks like the code bellow. It creates a Swift Attachment and creates a Swift mail. As part of the mail I also included the content of the ics (I found some code that did that, but doesn't help).
The problem is that the ics is not recognized as an event in Hotmail. Only in the inbox summary line a event logo is added, but when the e-mail is opened it doesn't show the usual event invite overview.
$attachment = \Swift_Attachment::fromPath($location, 'application/ics')->setFileName('invite.ics')->setDisposition('inline');
$contents = file_get_contents($location);
$message = \Swift_Message::newInstance()
->addPart($this->renderView('PastonVerBundle:Mail:invite.html.twig', $parameters), 'text/html')
Example of an ics
PRODID:-//PASTON-12//NONSGML kigkonsult.se iCalcreator 2.10.23//