A Nextcloud app that provides a communication bridge between RoundCube (embedded via the mail_roundcube app) and Nextcloud services.
- Attach files from Nextcloud - Pick files from your Nextcloud storage and attach them to emails
- Save attachments to Nextcloud - Save email attachments directly to your Nextcloud files
- Insert share links - Create and insert public share links into your emails
- Calendar integration - Add calendar invitations (.ics files) directly to your Nextcloud Calendar
- Nextcloud 32+
- PHP 8.2+
- mail_roundcube app installed and configured
- NextBridge plugin installed in RoundCube
The bridge uses postMessage API to communicate between Nextcloud and the RoundCube iframe:
- Bridge Client Injection - When RoundCube loads in the iframe, the bridge injects a
NextcloudBridgeJavaScript object - RoundCube Plugin - The NextBridge plugin in RoundCube uses this object to request file operations
- Nextcloud Handlers - The bridge app handles these requests using Nextcloud's APIs (WebDAV, CalDAV, OCS Sharing)
┌────────────────────────────────────────────────────────────┐
│ Nextcloud │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ mail_roundcube_bridge │ │
│ │ ┌─────────────┐ postMessage ┌─────────────┐ │ │
│ │ │ Vue App │◄──────────────────│ Injected │ │ │
│ │ │ (Bridge) │ │ Client │ │ │
│ │ └──────┬──────┘ └──────┬──────┘ │ │
│ └─────────┼────────────────────────────────┼──────────┘ │
│ │ │ │
│ WebDAV/CalDAV ┌──────┴──────┐ │
│ OCS APIs │ RoundCube │ │
│ │ (iframe) │ │
│ │ NextBridge │ │
│ │ plugin │ │
│ └─────────────┘ │
└────────────────────────────────────────────────────────────┘
The injected NextcloudBridge object provides:
// Files
NextcloudBridge.pickFiles({ multiple: true, mimeTypes: ['image/*'] })
NextcloudBridge.saveFile(filename, base64Content, mimeType)
NextcloudBridge.saveFiles([{ filename, content, mimeType }])
NextcloudBridge.createShareLink()
// Calendar
NextcloudBridge.getCalendars()
NextcloudBridge.addToCalendar(calendarUrl, icsContent)
// Utils
NextcloudBridge.blobToBase64(blob)
NextcloudBridge.base64ToBlob(base64, mimeType)- Go to Nextcloud Apps
- Search for "RoundCube Bridge"
- Click Install
cd /path/to/nextcloud/apps
git clone https://github.com/Gecka-Apps/nextcloud-roundcube-bridge mail_roundcube_bridge
cd mail_roundcube_bridge
make buildThen enable the app in Nextcloud settings.
- Node.js 20+
- npm
# Install dependencies
npm install
# Development build (with source maps)
make dev
# Production build (minified)
make build
# Watch mode (auto-rebuild on changes)
make watch# PHP CodeSniffer
make phpcs
# PHP Mess Detector
make phpmd| Target | Description |
|---|---|
help |
Show available targets |
build |
Build production assets |
dev |
Build development assets |
watch |
Build and watch for changes |
phpcs |
Run PHP CodeSniffer |
phpmd |
Run PHP Mess Detector |
appstore |
Create app store package |
clean |
Remove build artifacts |
distclean |
Remove build artifacts and dependencies |
This app is released under the GNU Affero General Public License Version 3.
- Laurent Dinclaux laurent@gecka.nc - Gecka
- mail_roundcube - Nextcloud app that embeds RoundCube
- NextBridge - RoundCube plugin that uses this bridge
Built with 🥥 and ☕ by Gecka — Kanaky-New Caledonia 🇳🇨