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
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 :
Hi, i got a big problems with the mail including ICS.
I am using Laravel 11 and spatie/icalendar-generator 2.8
First i was including the ICS like an attachment :
But our security blocks ICS files, so I had to include these ICS directly in the body of the Mail via a symphony function.
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 :
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Microsoft Corporation//Outlook 16.0 MIMEDIR//EN
NAME:CONGES
X-WR-CALNAME:CONGES
METHOD:REQUEST
BEGIN:VEVENT
UID:670e87ac9b0fe
DTSTAMP:20241015T151804Z
SUMMARY:CONGES
ATTENDEE;CN=Admin:MAILTO:test@test.fr
DTSTART:20241017T000000
DTEND:20241017T235900
END:VEVENT
END:VCALENDAR
The text was updated successfully, but these errors were encountered: