SplatDev.Messaging.Smtp
1.1.0
dotnet add package SplatDev.Messaging.Smtp --version 1.1.0
NuGet\Install-Package SplatDev.Messaging.Smtp -Version 1.1.0
<PackageReference Include="SplatDev.Messaging.Smtp" Version="1.1.0" />
<PackageVersion Include="SplatDev.Messaging.Smtp" Version="1.1.0" />
<PackageReference Include="SplatDev.Messaging.Smtp" />
paket add SplatDev.Messaging.Smtp --version 1.1.0
#r "nuget: SplatDev.Messaging.Smtp, 1.1.0"
#:package SplatDev.Messaging.Smtp@1.1.0
#addin nuget:?package=SplatDev.Messaging.Smtp&version=1.1.0
#tool nuget:?package=SplatDev.Messaging.Smtp&version=1.1.0
SplatDev.Messaging.Smtp
SMTP email provider for SplatDev.Messaging — sends emails via System.Net.Mail.SmtpClient over SMTP. Supports authentication, TLS, custom ports, and event-driven error handling with the MailerSent event and SendException type.
Compatibility
| .NET | Umbraco | Package Version |
|---|---|---|
| 8.0 | 13 | 1.1.0 |
| 10.0 | 17 | 1.1.0 |
Installation
dotnet add package SplatDev.Messaging.Smtp
Configuration
Constructor
using SplatDev.Messaging.Smtp.Controllers;
var smtp = new SmtpController(
host: "smtp.example.com",
port: 587,
username: "user@example.com",
password: "your-password",
useSsl: true);
host— SMTP server hostnameport— SMTP server port (typically 25, 465, or 587)username— SMTP authentication usernamepassword— SMTP authentication passworduseSsl— Enable SSL/TLS
DI registration (recommended)
builder.Services.AddSingleton<ISmtpController>(sp =>
{
var config = builder.Configuration.GetSection("Smtp");
return new SmtpController(
config["Host"]!,
int.Parse(config["Port"]!),
config["Username"]!,
config["Password"]!,
bool.Parse(config["UseSsl"]!));
});
Usage
The SmtpController implements IMessagingController<MailMessage, SmtpResult>, wrapping System.Net.Mail.SmtpClient for SMTP delivery.
Send an email
using System.Net.Mail;
using SplatDev.Messaging.Interfaces;
var mail = new MailMessage
{
From = new MailAddress("no-reply@example.com", "SplatDev"),
Subject = "Welcome!",
Body = "<h1>Welcome aboard!</h1>",
IsBodyHtml = true,
};
mail.To.Add(new MailAddress("customer@example.com", "Customer"));
mail.CC.Add(new MailAddress("admin@example.com"));
mail.Bcc.Add(new MailAddress("archive@example.com"));
var result = await smtp.SendMessageAsync(mail);
if (result.Success)
Console.WriteLine("Email sent successfully");
else
Console.WriteLine($"Failed: {result.ErrorMessage}");
Handling the MailerSent event
smtp.MailerSent += (sender, args) =>
{
Console.WriteLine($"Email sent to {args.To} at {args.SentAt}");
};
Error handling with SendException
try
{
smtp.SendMessage(mail);
}
catch (SendException ex)
{
Console.WriteLine($"SMTP error: {ex.Message}");
Console.WriteLine($"Failed recipients: {string.Join(", ", ex.FailedRecipients)}");
}
Sync version
var result = smtp.SendMessage(mail); // synchronous wrapper
Features
- Full
IMessagingController<MailMessage, SmtpResult>implementation - Event-driven notification via
MailerSentevent (fires after each successful send) - Custom
SendExceptionfor structured error reporting including failed recipients - SSL/TLS support via
useSslconstructor parameter - HTML and plain-text body support via
MailMessage.IsBodyHtml - Uses
System.Net.Mail.SmtpClient— no third-party SMTP library needed - Async via
SendMessageAsyncwith sync convenience wrappers
Dependencies
| Package | Purpose |
|---|---|
Microsoft.AspNetCore.App |
Framework reference providing System.Net.Mail |
SplatDev.Messaging |
Core messaging abstractions (IMessagingController<T,U>) |
Target Frameworks
net8.0— for Umbraco 13 applicationsnet10.0— for Umbraco 17 applications
SplatDev.Messaging.Smtp — part of the SplatDev.Umbraco.Plugins suite. Licensed under MIT. © SplatDev Ltda.
Changelog
1.1.0 — 2026-08-25
Adds SmtpOptions and AddSplatDevSmtp(configuration), so the SMTP client can be configured and registered from appsettings.json rather than constructed by hand. The controller is tidied to match; sending behaviour is unchanged.
1.0.2 — 2026-08-24
Removes a dashboard screenshot that showed an error toast. It was captured against a site where this plugin's API was unreachable, so it advertised a broken dashboard. No screenshot is better than a misleading one; a replacement will be taken against a working install.
1.0.1 — 2026-08-24
Package metadata only: the listing now carries an icon and search tags, and the project and repository links point at the organisation that actually hosts this code. No code changes.
1.0.0 — 2026-08-24
This package now keeps a changelog. Earlier releases predate it and are not reconstructed here — consult the repository history for those. From this version on, every release records what changed for someone using it.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- SplatDev.Messaging (>= 1.1.0)
-
net8.0
- SplatDev.Messaging (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0 | 51 | 8/25/2026 |