Calendar Invites - Outlook integration
Steps to reproduce
- Create a Calendar Invite in Thunderbird - invite someone who's using Outlook 2010.
- 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.

Actual behaviour
No buttons are shown.

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
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:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;CUTYPE=INDIVI
DUAL:mailto:[email protected]
ORGANIZER;CN=Hans Dijkema:mailto:[email protected]
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.
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.
@hdijkema Thanks for already looking into a solution. It would be great if you could open a pull request for that.
cc @georgehrke
I need a little help here. How do I do that?
@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. :)
I think I created a pull. https://github.com/nextcloud/server/pull/12921
Tried it again: #12946
I suppose this issue is still valid? If not, please close this issue!
I don't use Nextcloud anymore. I don't know.
This issue is still valid, unfortunately.
Please reopen this issue. I found this ticket because i was missing this feature.
Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!
@szaimen : Invites sent from NC 25.0.3 to outlook still show as (attached) event.ics file 😢
Fix in #36118 is not yet merged indeed.