The .NET email platform for multi-provider delivery.
MailForge is a layered .NET email framework that gives you one strongly-typed API for sending, templating, validation, retries, auditing, and failover across eight email providers — plus a local Studio inbox for development and a channel-agnostic notification layer: email, Telegram, or any channel you register.
| Package | Description |
|---|---|
| MailForge | Core pipeline: models, builders, templates, validation, retries, auditing, failover |
| MailForge.Communication | Channel-agnostic notifications: INotificationSender, channels, middleware |
| MailForge.Telegram | Telegram Bot API channel: text, photos, documents, and inline keyboards |
| MailForge.Webhook | Generic HTTP webhook channel: POST a payload to any endpoint, with optional HMAC-SHA256 signing |
| MailForge.Smtp | SMTP delivery via MailKit |
| MailForge.Resend | Resend API provider |
| MailForge.AmazonSES | Amazon Simple Email Service provider |
| MailForge.Postmark | Postmark API provider |
| MailForge.Mailgun | Mailgun API provider |
| MailForge.Brevo | Brevo (Sendinblue) API provider |
| MailForge.ZeptoMail | Zoho ZeptoMail API provider |
| MailForge.AzureCS | Azure Communication Services provider |
using MailForge.Extensions;
using MailForge.Interfaces;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddMailForge(builder => builder
.UseDefaultFrom("noreply@example.com")
.UseProvider(new MailForge.Postmark.PostmarkEmailProvider(
new MailForge.Postmark.PostmarkOptions { ServerToken = "..." })));
await using var provider = services.BuildServiceProvider();
var sender = provider.GetRequiredService<IEmailSender>();
var result = await sender.SendAsync(
MailForge.Models.EmailMessage.Create()
.To("user@example.com")
.Subject("Hello from MailForge")
.Html("<h1>Hello</h1><p>Delivered through Postmark.</p>")
.Build());
Console.WriteLine(result.Status);