Pragmatic.Notifications
A unified notification pipeline for .NET — one API to send email, webhook, SMS, push, in-app, and Slack notifications, with channel routing, user preferences, delivery tracking, and background processing.
The Problem
Section titled “The Problem”Every notification use case grows its own ad-hoc delivery code — a fresh SMTP client here, an HTTP webhook there, a Twilio call elsewhere — each with its own setup, error handling, retry, and tracking. Add a channel and every call site must change; enforcing user preferences (muted categories, do-not-disturb) consistently becomes impossible.
await smtpClient.SendMailAsync(new MailMessage("noreply@hotel.com", guestEmail) { /* ... */ });await httpClient.PostAsync("https://hooks.slack.com/...", slackJson);await MessageResource.CreateAsync(to: guestPhone, from: "+1555000", body: "...");The Solution
Section titled “The Solution”Send a notification through one pipeline; channel routing, user preferences, delivery tracking, and background processing are handled for you.
await notifier.SendAsync(new ReservationConfirmed(guestId){ Channels = NotificationChannel.Email | NotificationChannel.Sms,});Configure channels once in the host (app.UseNotifications(n => n.AddSmtp(...))); add a new channel
without touching call sites; user preferences and do-not-disturb are enforced centrally.
Installation
Section titled “Installation”dotnet add package Pragmatic.Notificationsdotnet add package Pragmatic.Notifications.Email # SMTP channel (delegates to Pragmatic.Email)Status
Section titled “Status”The pipeline, channel routing, user preferences, delivery tracking, and the SMTP channel are functional within the 0.8 preview. See the roadmap.
| Concepts | The pipeline, channels, routing, preferences, delivery tracking | | Getting Started | Send your first notification, configure a channel | | Common Mistakes | The most frequent notification pitfalls | | Troubleshooting | Problem/solution guide |
Requirements
Section titled “Requirements”- .NET 10.0+
License
Section titled “License”Part of the Pragmatic.Design ecosystem — see Licensing. Pragmatic.Notifications is licensed under the PolyForm Small Business 1.0.0 license (free for small businesses; commercial license above the threshold).