diff --git a/components/ILIAS/Calendar/classes/class.ilCalendarMailNotification.php b/components/ILIAS/Calendar/classes/class.ilCalendarMailNotification.php index add740271f6f..59ec724b8caa 100755 --- a/components/ILIAS/Calendar/classes/class.ilCalendarMailNotification.php +++ b/components/ILIAS/Calendar/classes/class.ilCalendarMailNotification.php @@ -381,17 +381,15 @@ protected function addAttachment(): void $export->setAppointments([(int) $this->getAppointmentId()]); $export->export(); + $ics_filename = 'appointment_' . (new DateTimeImmutable('now'))->format('Ymd_His_u') . '.ics'; + $attachment = new ilFileDataMail($this->getSender()); - $attachment->storeAsAttachment( - 'appointment.ics', + $effective_ics_filename = $attachment->storeAsAttachment( + $ics_filename, $export->getExportString() ); - $this->setAttachments( - array( - 'appointment.ics' - ) - ); + $this->setAttachments([$effective_ics_filename]); } protected function deleteAttachments(): void