Skip to content

Commit

Permalink
fix: Fix event attachement issue for some email inbox providers (#723)
Browse files Browse the repository at this point in the history
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 cce3e1b)
  • Loading branch information
hbenali committed Dec 27, 2024
1 parent 88793f0 commit 8c97f44
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8c97f44

Please sign in to comment.