From 8c97f44b86fe4007fdc9c067475b4cf788f5a89f Mon Sep 17 00:00:00 2001 From: Houssem Ben Ali Date: Fri, 27 Dec 2024 12:45:27 +0100 Subject: [PATCH] fix: Fix event attachement issue for some email inbox providers (#723) Before this fix, the attachement was sent as raw text/Calendar without attachment name. This PR will add attachement name to avoid attachement lack in some mail inboxes (Cherry-picked from cce3e1b3429a5b2e751f1e648cf730bf1883a528) --- .../main/java/org/exoplatform/agenda/util/NotificationUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/agenda-services/src/main/java/org/exoplatform/agenda/util/NotificationUtils.java b/agenda-services/src/main/java/org/exoplatform/agenda/util/NotificationUtils.java index 213a5a2c5..3cdf93ba7 100644 --- a/agenda-services/src/main/java/org/exoplatform/agenda/util/NotificationUtils.java +++ b/agenda-services/src/main/java/org/exoplatform/agenda/util/NotificationUtils.java @@ -935,6 +935,7 @@ public static final void addIcsFile(NotificationInfo notification, MessageInfo m byte[] bytes = output.toByteArray(); attachment.setInputStream(new ByteArrayInputStream(bytes)); attachment.setMimeType("text/calendar;charset=utf-8;method=PUBLISH"); + attachment.setName("event.ics"); messageInfo.addAttachment(attachment); } catch (IOException e) { throw new IllegalStateException("Unable to convert event '" + eventSummary + "' to iCal format", e);