SendHub is a .NET automation tool that monitors a folder for new files and automatically sends them as email attachments to configured recipients. It's designed to streamline file distribution workflows with minimal configuration.
SendHub watches a specified folder for new files and automatically emails them to configured recipients using SMTP. It includes a web-based configuration interface accessible in your browser. This makes it perfect for automating document workflows, reports distribution, and file sharing processes.
- Folder Monitoring: Continuously watches a configured folder for new files using two complementary mechanisms:
- Real-time detection via
FileSystemWatcher(instant, works on native Linux) - Polling fallback that re-scans the folder every 30 seconds (configurable) β this is the primary detection path when running in Docker on Windows, where
FileSystemWatchercannot receive change events from the Windows host due to a WSL2/inotify limitation
- Real-time detection via
- Email Delivery: Automatically sends detected files as email attachments via SMTP
- File Archiving: Moves processed files to a configurable destination folder (with automatic conflict resolution)
- Idempotency Tracking: Persists processed file records to SQLite database so files are never sent twice after a restart (with automatic migration from legacy JSON tracking)
- Web-Based Configuration: A Blazor web interface (accessible on port 8080) for managing all settings without editing config files
- Database-Driven Configuration: All settings are stored in SQLite and hot-reloaded at runtime β no restart required after changes
- Activity Logging: View send logs and activity history through the web interface
- Multi-Channel Distribution: Send files to multiple platforms:
- Microsoft Teams
- Slack
- Custom Webhooks
- Additional email recipients
All settings (watch folder, SMTP, polling interval, etc.) are configured through the web interface at http://localhost:8080 and stored in a SQLite database. No config files need to be edited for normal use.
The only setting that must be provided before the app can start is the database path β everything else is managed via the web UI.
In appsettings.json (or via environment variable):
{
"SendHub": {
"Database": {
"Path": "D:\\SendHub\\sendhub.db"
}
}
}Or as an environment variable:
SendHub__Database__Path=/data/db/sendhub.db- .NET 10.0 SDK or later
-
Clone the repository:
git clone https://github.com/JeffrySteegmans/SendHub.git cd SendHub -
Build the application:
dotnet build
-
Configure the application (see Configuration section above)
-
Run the application:
dotnet run
SendHub can run as a Docker container, which is the recommended deployment method for production use.
- Docker Engine 24.0 or later
- Docker Compose v2 (included with Docker Desktop)
-
Clone the repository:
git clone https://github.com/JeffrySteegmans/SendHub.git cd SendHub -
Create a
.envfile from the example:cp .env.example .env
-
Edit
.envwith your scan folder path:SCAN_FOLDER_HOST_PATH=/path/to/your/scan/folder
-
Start the container:
docker compose up -d
-
Open the web interface at
http://localhost:8080to configure SendHub. -
View logs:
docker compose logs -f sendhub
docker build -t sendhub .
docker run -d \
--name sendhub \
--restart unless-stopped \
-p 8080:8080 \
-v /path/to/scan/folder:/data/scan \
-v sendhub-db:/data/db \
sendhubThen open http://localhost:8080 to configure SendHub via the web interface.
When running on Docker Desktop for Windows, FileSystemWatcher cannot detect files dropped from Windows Explorer into a bind-mounted folder. This is a known WSL2 limitation: the Linux container's inotify subsystem does not receive change events for writes originating from the Windows host.
SendHub works around this automatically via its polling fallback: it re-scans the watch folder every PollingIntervalSeconds (default: 30 s) and picks up any files that FileSystemWatcher missed. No extra configuration is required β just be aware that detection latency is up to 30 seconds instead of instant when running on Windows.
To reduce the polling interval (e.g. for faster testing), set:
-e SendHub__PollingIntervalSeconds=5| Container path | Purpose | Recommended mount |
|---|---|---|
/data/scan |
Folder monitored for new files. Processed files are moved to /data/scan/Processed. |
Bind mount to host scan folder |
/data/db |
Stores sendhub.db SQLite database (processed file tracking + all settings). |
Named Docker volume |
All application settings (watch folder, SMTP, etc.) are managed through the web UI. The only environment variable needed at container startup is the database path.
| Variable | Required | Default | Description |
|---|---|---|---|
SendHub__Database__Path |
No | /data/db/sendhub.db |
Path to the SQLite database (stores all settings and tracking data) |
- Start SendHub with your configuration
- Place files in the monitored folder
- SendHub will automatically detect new files and send them via email
- Monitor the logs for delivery status
dotnet builddotnet testThis project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
For issues, questions, or suggestions, please open an issue on the GitHub repository.
- MVP: Folder monitoring and email delivery
- File archiving (move to destination folder with conflict resolution)
- Idempotency tracking (SQLite database with automatic JSON migration)
- Docker image support
- SQLite database for persistent tracking (with automatic migration from legacy JSON)
- Database-driven configuration (settings stored in SQLite, hot-reloaded at runtime)
- Web-based configuration interface (Blazor, port 8080)
- Activity logging and history
- Microsoft Teams integration
- Slack integration
- Webhook support
- Multiple recipient support
Made with β€οΈ by Jeffry Steegmans