SmartMail.NET is a powerful and extensible email delivery pipeline for .NET applications.
It provides a flexible architecture for managing multiple email providers, handling quotas, and implementing fallback mechanisms.
SmartMail.NET consists of two main packages:
dotnet add package SmartMail.NET.Core
The core package provides the email sending pipeline, provider management, and quota tracking.
dotnet add package SmartMail.NET.Dashboard
The dashboard package provides a real-time monitoring interface for your email providers.
dotnet add package SendMail.NET
- Register the core pipeline in your
Program.cs
orStartup.cs
- Configure your providers
- Use the injected services to send emails
services.AddSendMail(config =>
{
// Configure SMTP provider
config.AddProvider<SmtpEmailProvider>(options =>
{
options.Name = "SMTP";
options.Priority = 1;
options.HourlyQuota = 100;
options.DailyQuota = 1000;
options.MonthlyQuota = 10000;
options.Settings["Host"] = "smtp.gmail.com";
options.Settings["Port"] = "587";
options.Settings["EnableSsl"] = "true";
options.Settings["Username"] = "your-email@gmail.com";
options.Settings["Password"] = "your-app-password";
options.Settings["DefaultFrom"] = "your-email@gmail.com";
});
// Configure provider behavior
config.ConfigureProviders(options =>
{
options.EnableFallback = true;
options.MaxRetries = 3;
});
// Use default pipeline
config.UseDefaultPipeline();
});
Every email provider implements the shared IEmailProvider
interface, allowing:
- Custom retry logic
- Load balancing
- Metrics collection
- Easy fallback switching
Want to build your own provider? Just implement the interface and register it.
Validate Email
↓
Select Provider (priority/failover)
↓
Send Email
↓
Track Result
- Core pipeline and interfaces
- SMTP provider
- SendGrid provider
- Mailgun provider
- Amazon SES provider
- Dashboard UI for monitoring
- Webhook support for delivery confirmations
- SQL Server / PostgreSQL logging
- Hangfire/Quartz integration
- Blazor-based UI plugin support
This project is owned and maintained by the Net of Code team. All contributions become the property of Net of Code.
Contributions are welcome! Whether it's a bug fix, a new provider, or improvements — please open a PR or issue.
MIT