the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
924 stars 109 forks source link

How to view ICS file? #1603

Closed koffienl closed 1 week ago

koffienl commented 1 month ago

I've been using Snappymail for a long time now, but one thing never has worked for me: how do I view an ICS file? Currently I'm running version 2.36.1 (on Chrome if that matters) and have enabled the plugin 'View ICS' (version 2.1), but that makes no difference. When a mail has an ICS attached it will only download the file.

It surely should be an option to just view an ICS so you know a date and time for that invitation?

the-djmaze commented 1 month ago

The extension creates HTML after the attachments location. And when an attachment with mime text/calendar is found it shows it like this: image

koffienl commented 1 month ago

Just tested by sending a teams meeting from my work outlook to my private mail. As always, I only see an attached ICS file. What am I doing wrong here?

image image

the-djmaze commented 1 month ago

Maybe Outlook is not using text/calendar? View the source of the email, it should be something like:

--nextPart5703665.DvuYhMxLoT
Content-Disposition: attachment; filename="sample.ics"
Content-Transfer-Encoding: 7Bit
Content-Type: text/calendar; charset="utf-8"; name="sample.ics"

BEGIN:VCALENDAR
koffienl commented 1 month ago

Looks OK in the source to me?

--_000_AS2PR10MB715546E44DB0E513B2A6B37FCCF02AS2PR10MB7155EURP_
Content-Type: text/calendar; charset="utf-8"; method=REQUEST
Content-Transfer-Encoding: base64
the-djmaze commented 1 month ago

You can send me the email as attachment to issue-1603@snappymail.eu and i can take a look.

Maybe the base64 is not handled or because the Content-Disposition is missing

the-djmaze commented 1 month ago

Uncaught (in promise) RangeError: invalid time zone in DateTimeFormat(): W. Europe Standard Time

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
BEGIN:VTIMEZONE
    TZID:W. Europe Standard Time
    BEGIN:STANDARD
        DTSTART:16010101T030000
        TZOFFSETFROM:+0200
        TZOFFSETTO:+0100
        RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
    END:STANDARD
    BEGIN:DAYLIGHT
        DTSTART:16010101T020000
        TZOFFSETFROM:+0100
        TZOFFSETTO:+0200
        RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
    END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
    DTSTART;TZID=W. Europe Standard Time:20240528T093000
    DTEND;TZID=W. Europe Standard Time:20240528T100000
END:VEVENT
END:VCALENDAR

I will create a VTIMEZONE handler or something

the-djmaze commented 1 week ago

I've added a mapping from Windows timezones to the global IANA registered timezones.