我创建ICS事件
BEGIN:VCALENDAR
VERSION:2.0
PRODID:*******
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Europe/Paris
BEGIN:STANDARD
DTSTART:19691231T230000
TZOFFSETTO:+0200
TZOFFSETFROM:+0100
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:******
DTSTART:20180612T090000
DTEND:20180612T120000
STATUS:CONFIRMED
SUMMARY:Absence
DESCRIPTION:
DTSTAMP:20180609T131658Z
ATTENDEE;CN=*****:mailto:*****
ORGANIZER;CN=***;LANGUAGE=fr:mailto:*****
END:VEVENT
END:VCALENDAR
然后我通过Symfony2(Swift Mailer)通过邮件发送
$message = \Swift_Message::newInstance()
->setSubject($subject)
->setFrom($sender->getValue())
->setTo($to->getEmail())
->setBody($body, 'text/html');
$attachment = \Swift_Attachment::newInstance()
->setFilename("event.ics")
->setDisposition('inline')
->setBody($calendar->getContent());
$message->attach($attachment);
$this->container->get('mailer')->send($message);
当我在Outlook中收到邮件时,事件标题是电子邮件主题,而不是真实的事件标题。
有没有办法解决这个问题?