Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar Invites - Outlook integration #12885

Closed
hdijkema opened this issue Dec 6, 2018 · 13 comments · Fixed by #36118
Closed

Calendar Invites - Outlook integration #12885

hdijkema opened this issue Dec 6, 2018 · 13 comments · Fixed by #36118
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug feature: dav

Comments

@hdijkema
Copy link

hdijkema commented Dec 6, 2018

Steps to reproduce

  1. Create a Calendar Invite in Thunderbird - invite someone who's using Outlook 2010.
  2. Create a similar Calendar Invite in Nextcloud - invite same person using Outlook 2010

Expected behaviour

I expect the same behaviour as with Outlook 2016, i.e. the invite gives me buttons on top of the invite and show me the calendar of Outlook/Exchange. However, with the thunderbird invite and invites from google, they are shown; but not with the invites from nextcloud. Thunderbird/nextcloud invites come from the same domain.

image

Actual behaviour

No buttons are shown.
image

Server configuration

Operating system: Ubuntu 18

Web server: Apache2

Database: PostgreSQL 9.5

PHP version: 7.2

Nextcloud version: (see Nextcloud admin page) 14.x

Updated from an older Nextcloud/ownCloud or fresh install: Updated

Where did you install Nextcloud from: Web

@hdijkema
Copy link
Author

hdijkema commented Dec 6, 2018

I investigated the issue, by looking at the email that nextcloud sends. The difference between google, thunderbird and nextcloud is that nextcloud doesn't send a plain text/calendar mime part. So I setup a telnet session with my postfix smtp daemon, pasted the whole nextcloud invite without the last mime boundary and added the base64 decoded VCALENDAR item in plain text:

--_=_swift_1544110679_5950e85027774b8eec65f40de781557c_=_
Content-Type: text/calendar; method=REQUEST; charset="UTF-8"
Content-Transfer-Encoding: 7bit

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.1.2//EN
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
CREATED:20181206T163735
DTSTAMP:20181206T163735
LAST-MODIFIED:20181206T163735
UID:WNUPZ1W3AHH5D2G3STLBCS
SUMMARY:KLOP
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;CUTYPE=INDIVI
 DUAL:mailto:first.participant@gmail.com
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;CUTYPE=INDIVI
 DUAL:mailto:next.participant@outlook2010user.com
ORGANIZER;CN=Hans Dijkema:mailto:hansdijkema@example.com
CLASS:PUBLIC
STATUS:CONFIRMED
DTSTART;VALUE=DATE:20181209
DTEND;VALUE=DATE:20181210
END:VEVENT
END:VCALENDAR

--_=_swift_1544110679_5950e85027774b8eec65f40de781557c_=_--

And voilà! Outlook 2010 understands the message and provides accept/decline/tentative buttons.

@hdijkema
Copy link
Author

hdijkema commented Dec 7, 2018

I did some patching in nextcloud 14.0.4; Patched following files to make nextcloud invite compliant with Outlook 2010:

  • lib/public/Mail/IMessage.php
  • lib/private/Mail/Message.php
  • apps/dav/lib/CalDAV/Schedule/IMipPlugin.php

IMessage.php

        public function attach(IAttachment $attachment): IMessage;

        # ADDED HD
        public function addPart($body, $content_type = null, $charset = null): IMessage;
        # ADDED HD

        /**

Message.php

        public function attach(IAttachment $attachment): IMessage {
                /** @var Attachment $attachment */
                $this->swiftMessage->attach($attachment->getSwiftAttachment());
                return $this;
        }

        # ADDED HD
        public function addPart($data, $content_type = null, $charset = null): IMessage {
               $this->swiftMessage->addPart($data, $content_type, $charset);
               return $this;
        }
        # ADDED HD

        /**

IMipPlugin.php

                # REMOVED HD
                #$attachment = $this->mailer->createAttachment(
                #       $iTipMessage->message->serialize(),
                #       'event.ics',// TODO(leon): Make file name unique, e.g. add event id
                #       'text/calendar; method=' . $iTipMessage->method
                #);
                #$message->attach($attachment);
                # REMOVED HD

                # ADDED HD
                $message->addPart(
                        $iTipMessage->message->serialize(),
                        'text/calendar; method=' . $iTipMessage->method,
                        'UTF-8'
                );
                # ADDED HD

                try {
 

Tested this solution with

  • gmail/google calendar
  • Outlook 2016 (Office 365)
  • Outlook 2010
  • Thunderbird with Lightning

And it worked.

@juliusknorr
Copy link
Member

@hdijkema Thanks for already looking into a solution. It would be great if you could open a pull request for that.

cc @georgehrke

@hdijkema
Copy link
Author

hdijkema commented Dec 7, 2018

I need a little help here. How do I do that?

@georgehrke
Copy link
Member

@hdijkema Hey, thanks for the deep analysis and the fix.
GitHub provides a great documentation on how to send a pull-request: https://help.github.com/articles/creating-a-pull-request-from-a-fork/

If you have any issues, please don't hesitate to ask for help. :)

@hdijkema
Copy link
Author

hdijkema commented Dec 7, 2018

I think I created a pull. #12921

Tried it again: #12946

hdijkema added a commit to hdijkema/server that referenced this issue Dec 9, 2018
Signed-off-by: hdijkema <hans@dykema.nl>
hdijkema added a commit to hdijkema/server that referenced this issue Dec 18, 2018
hdijkema added a commit to hdijkema/server that referenced this issue Jan 14, 2019
Signed-off-by: hdijkema <hans@dykema.nl>
hdijkema added a commit to hdijkema/server that referenced this issue Jan 14, 2019
@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@MorrisJobke MorrisJobke mentioned this issue Jul 17, 2019
28 tasks
@georgehrke georgehrke added 2. developing Work in progress and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Sep 14, 2019
@szaimen
Copy link
Contributor

szaimen commented May 26, 2021

I suppose this issue is still valid? If not, please close this issue!

@hdijkema
Copy link
Author

I don't use Nextcloud anymore. I don't know.

@averymd
Copy link

averymd commented May 28, 2021

This issue is still valid, unfortunately.

@mkbrechtel
Copy link

Please reopen this issue. I found this ticket because i was missing this feature.

@szaimen
Copy link
Contributor

szaimen commented Jan 9, 2023

Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

@szaimen szaimen added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 2. developing Work in progress labels Jan 9, 2023
@AbelLykens
Copy link

@szaimen : Invites sent from NC 25.0.3 to outlook still show as (attached) event.ics file 😢

@tcitworld
Copy link
Member

Fix in #36118 is not yet merged indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug feature: dav
Projects
None yet
9 participants