SplatDev.Messaging.SendGrid
1.0.2
dotnet add package SplatDev.Messaging.SendGrid --version 1.0.2
NuGet\Install-Package SplatDev.Messaging.SendGrid -Version 1.0.2
<PackageReference Include="SplatDev.Messaging.SendGrid" Version="1.0.2" />
<PackageVersion Include="SplatDev.Messaging.SendGrid" Version="1.0.2" />
<PackageReference Include="SplatDev.Messaging.SendGrid" />
paket add SplatDev.Messaging.SendGrid --version 1.0.2
#r "nuget: SplatDev.Messaging.SendGrid, 1.0.2"
#:package SplatDev.Messaging.SendGrid@1.0.2
#addin nuget:?package=SplatDev.Messaging.SendGrid&version=1.0.2
#tool nuget:?package=SplatDev.Messaging.SendGrid&version=1.0.2
SplatDev.Messaging.SendGrid
SendGrid email provider for SplatDev.Messaging — sends emails via the SendGrid Web API using the official SendGridClient. Supports CC/BCC, HTML and plain-text bodies, and both single and bulk delivery with full async support.
Compatibility
| .NET | Umbraco | Package Version |
|---|---|---|
| 8.0 | 13 | 1.0.0 |
| 10.0 | 17 | 1.0.0 |
Installation
dotnet add package SplatDev.Messaging.SendGrid
Configuration
Constructor
using SplatDev.Messaging.SendGrid.Controllers;
var sendGrid = new SendGridController(
apiKey: "SG.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
apiKey— Your SendGrid API key (starts withSG.)
DI registration (recommended)
builder.Services.AddSingleton<ISendGridController>(sp =>
{
var apiKey = builder.Configuration["SendGrid:ApiKey"];
return new SendGridController(apiKey!);
});
Usage
The SendGridController implements IMessagingController<SendGridMessage, Response>, providing a consistent interface across all SplatDev messaging providers.
Send a single email
using SplatDev.Messaging.Interfaces;
using SplatDev.Messaging.SendGrid.Models;
var msg = new SendGridMessage
{
From = new EmailAddress("no-reply@example.com", "SplatDev"),
Subject = "Welcome!",
HtmlContent = "<h1>Welcome aboard!</h1>",
PlainTextContent = "Welcome aboard!",
};
msg.AddTo(new EmailAddress("customer@example.com", "Customer"));
msg.AddCc(new EmailAddress("admin@example.com", "Admin"));
msg.AddBcc(new EmailAddress("archive@example.com", "Archive"));
var response = await sendGrid.SendMessageAsync(msg);
if (response.IsSuccessStatusCode)
Console.WriteLine($"Sent! Status: {response.StatusCode}");
else
{
var body = await response.Body.ReadAsStringAsync();
Console.WriteLine($"Failed ({response.StatusCode}): {body}");
}
Bulk send
var bulk = new SendGridMessage
{
From = new EmailAddress("news@example.com", "Newsletter"),
Subject = "Monthly Update",
HtmlContent = "<p>Hello, %%name%%!</p>",
PlainTextContent = "Hello, %%name%%!",
MailSettings = new MailSettings { SandboxMode = new SandboxMode { Enable = false } }
};
// Add multiple tos for bulk delivery
bulk.AddTo(new EmailAddress("user1@example.com", "User One"));
bulk.AddTo(new EmailAddress("user2@example.com", "User Two"));
bulk.AddTo(new EmailAddress("user3@example.com", "User Three"));
var bulkResponse = await sendGrid.SendMessageAsync(bulk);
Sync version
var response = sendGrid.SendMessage(msg); // synchronous wrapper
Features
- Full
IMessagingController<SendGridMessage, Response>implementation - Truly async via
SendMessageAsync— awaits the SendGrid Web API - Sync convenience wrappers
- CC and BCC recipient support
- HTML and plain-text body support
- Single and bulk email delivery
- Uses the official
SendGridSDK (SendGridClient) Responseobject exposesStatusCode,Body, andIsSuccessStatusCode
Dependencies
| Package | Purpose |
|---|---|
SendGrid (v9.29.3) |
Official SendGrid API client |
SplatDev.Messaging |
Core messaging abstractions (IMessagingController<T,U>) |
Target Frameworks
net8.0— for Umbraco 13 applicationsnet10.0— for Umbraco 17 applications
SplatDev.Messaging.SendGrid — part of the SplatDev.Umbraco.Plugins suite. Licensed under MIT. © SplatDev Ltda.
Changelog
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
- SendGrid (>= 9.29.3)
- SplatDev.Messaging (>= 1.0.2)
-
net8.0
- SendGrid (>= 9.29.3)
- SplatDev.Messaging (>= 1.0.2)
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.0.2 | 46 | 8/24/2026 |