You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ICS Already Include in Body for Outlook/Gmail... but not for Office 365 #143
But our security blocks ICS files, so I had to include these ICS directly in the body of the Mail via a symphony function.
$mailable->withSymfonyMessage(function (Email $email) use ($leave, $mailable) {
$ics = $this->generateLeaveICS($leave);
$htmlContent = (string) $mailable->markdown('mailing::email')->render();
$htmlPart = new TextPart($htmlContent, 'utf-8', 'html');
$calendarPart = new TextPart($ics, 'utf-8', 'calendar');
$email->setBody(new MixedPart($htmlPart, $calendarPart));
});
Since I put this code in place, the invitation is interpreted correctly by Outlook and Gmail, but keeps an ICS file named ATT00001.ics on outlook.office365.com. However, I added specific headers to MSO such as X-MS-Has-Attach, X-MS-TNEF-Correlator, Accept-Language, Content-Language, x-ms-exchange-calendar-series-instance- id. I even tried to transform multipart/mixed into multipart/alternative but without any success. Do you have any ideas that could help me move forward on this issue?
Here is my ICS content that is validated by iCalendar Validator :
Activity