PHPackages                             reluem/contao-nc-file-gateway - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. reluem/contao-nc-file-gateway

ActiveContao-bundle[File &amp; Storage](/categories/file-storage)

reluem/contao-nc-file-gateway
=============================

Restores the Notification Center 1.x file/CSV gateway for Notification Center 2

v1.1.2(1mo ago)02↓75%LGPL-3.0-or-laterPHPPHP ^8.1

Since Jul 15Pushed 1mo agoCompare

[ Source](https://github.com/reluem/contao-nc-file-gateway)[ Packagist](https://packagist.org/packages/reluem/contao-nc-file-gateway)[ Docs](https://github.com/reluem/contao-nc-file-gateway)[ RSS](/packages/reluem-contao-nc-file-gateway/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (5)Used By (0)

Contao NC File Gateway
======================

[](#contao-nc-file-gateway)

Contao bundle that restores the **file/CSV gateway** removed in Notification Center 2.

In NC 1.x you could append form submissions to a CSV file and optionally attach that file to notification emails. NC 2 dropped this gateway type. This bundle brings it back using the official NC 2 architecture (gateways, parcels, bulky-item vouchers).

**Typical use case:** store every form submission in a CSV under `files/` and send the same CSV as an email attachment to an internal recipient.

Requirements
------------

[](#requirements)

- PHP 8.1+
- Contao 4.13.50+ or Contao 5.3+
- `terminal42/notification_center` ^2.6

Installation
------------

[](#installation)

```
composer require reluem/contao-nc-file-gateway
```

Then run migrations and clear the cache:

```
php vendor/bin/contao-console contao:migrate --no-interaction
php vendor/bin/contao-console cache:clear
```

Backend setup
-------------

[](#backend-setup)

### 1. Create a file gateway

[](#1-create-a-file-gateway)

**Notification Center → Gateways → New gateway**

FieldExampleTypeFile/CSVExport folderpick `exports/form-submissions` in the file manager### 2. Add a file message to your notification

[](#2-add-a-file-message-to-your-notification)

**Notification Center → Notifications → your notification → Messages → New message**

FieldExampleGatewayyour file gatewayFile name`submissions.csv`Storage modeAppendFile content`{{date::d.m.Y H:i}};##form_lastname##;##form_firstname##;##form_email##`The **file content** field defines one CSV line per submission. Use semicolons, simple tokens (`##form_*##`), and insert tags (`{{date::…}}`) as needed.

**Important:** sort this message **before** any mailer message in the same notification.

Email integration
-----------------

[](#email-integration)

To attach the CSV to an outgoing email in the same notification:

1. Create (or edit) a **mailer** message in the same notification.
2. Set the mailer message **sorting lower** than the file message (file message runs first).
3. In the mailer message language settings, add this token to **Attachment tokens**:

    ```
    ##nc_file_voucher##

    ```
4. Configure recipients, subject, and body as usual.

**Example notification layout:**

SortingMessageGatewayPurpose1Save CSVFile/CSVWrites/appends the CSV line2Internal notificationContao MailerSends email with CSV attachedWhen the form is submitted, NC processes messages in order:

1. The file message writes the new line to the configured CSV.
2. The mailer message picks up the voucher from step 1 and attaches the current CSV file to the email.

You can combine `##nc_file_voucher##` with other attachment tokens if needed.

How it works
------------

[](#how-it-works)

1. NC creates parcels for all messages in sorting order.
2. For **file** messages, `FileExportListener` appends the CSV line and stores a bulky-item voucher.
3. For **mailer** messages with `##nc_file_voucher##`, `MailerFileAttachmentListener` adds that voucher as an attachment.

Migration from NC 1.x
---------------------

[](#migration-from-nc-1x)

If NC 2 already dropped the old `file_*` columns, this bundle's migration re-adds:

- `tl_nc_gateway.file_type`, `tl_nc_gateway.file_path`
- `tl_nc_language.file_name`, `tl_nc_language.file_storage_mode`, `tl_nc_language.file_content`

Existing language records keep their values if the columns were preserved in your database.

License
-------

[](#license)

LGPL-3.0-or-later

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f54f5a1287485e2bde1e2dbcc972d1c6e900109e44269eb31e5f25fb2dfd4295?d=identicon)[reluem](/maintainers/reluem)

---

Top Contributors

[![reluem](https://avatars.githubusercontent.com/u/17430489?v=4)](https://github.com/reluem "reluem (5 commits)")

---

Tags

csvfilegatewaycontaoformnotification\_center

### Embed Badge

![Health badge](/badges/reluem-contao-nc-file-gateway/health.svg)

```
[![Health](https://phpackages.com/badges/reluem-contao-nc-file-gateway/health.svg)](https://phpackages.com/packages/reluem-contao-nc-file-gateway)
```

###  Alternatives

[markocupic/calendar-event-booking-bundle

Contao Calendar Event Booking Bundle

135.5k1](/packages/markocupic-calendar-event-booking-bundle)[contao-community-alliance/dc-general

Universal data container for Contao

1681.8k94](/packages/contao-community-alliance-dc-general)[alnv/catalog-manager

Catalog Manager for Contao CMS

3434.9k12](/packages/alnv-catalog-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
