Transmitly.Client
1.0.0
dotnet add package Transmitly.Client --version 1.0.0
NuGet\Install-Package Transmitly.Client -Version 1.0.0
<PackageReference Include="Transmitly.Client" Version="1.0.0" />
<PackageVersion Include="Transmitly.Client" Version="1.0.0" />
<PackageReference Include="Transmitly.Client" />
paket add Transmitly.Client --version 1.0.0
#r "nuget: Transmitly.Client, 1.0.0"
#:package Transmitly.Client@1.0.0
#addin nuget:?package=Transmitly.Client&version=1.0.0
#tool nuget:?package=Transmitly.Client&version=1.0.0
Transmitly .NET SDK
Dependency-free .NET 8 client for the Transmitly API.
# from the platform repository
dotnet add reference sdk/dotnet/Transmitly/Transmitly.csproj
# once published
# dotnet add package Transmitly.Client
using Transmitly;
var tx = new TransmitlyClient(Environment.GetEnvironmentVariable("TRANSMITLY_API_KEY")!);
var accepted = await tx.Emails.SendAsync(new EmailMessage
{
From = "Notify <notify@mail.acme.com>",
To = new[] { "ada@example.net" },
Subject = "Your workspace is ready",
Html = "<p>Welcome.</p>",
ReplyTo = "Support <support@acme.com>",
Tags = new Dictionary<string, string> { ["flow"] = "onboarding" },
});
// accepted.Id, accepted.Recipients
SendAsync generates an idempotency key. Pass idempotencyKey: to control it
yourself; retries with the same key return the original message.
ASP.NET Core
Register one client and inject it into controllers, minimal APIs or workers:
// Program.cs
builder.Services.AddSingleton(_ =>
new TransmitlyClient(builder.Configuration["Transmitly:ApiKey"]
?? throw new InvalidOperationException("Transmitly:ApiKey is required")));
app.MapPost("/welcome", async (TransmitlyClient tx, string email) =>
{
var accepted = await tx.Emails.SendAsync(new EmailMessage
{
From = "Notify <notify@mail.acme.com>",
To = new[] { email },
Subject = "Welcome to Acme",
Html = "<p>Your workspace is ready.</p>",
});
return Results.Accepted($"/messages/{accepted.Id}", new { accepted.Id });
});
Keep the API key in configuration or a secret store. Never ship it to a client application.
Resources
await tx.Emails.GetAsync(messageId);
await tx.Messages.ListAsync(status: "bounced", limit: 20);
await tx.Messages.DeliveriesAsync(messageId);
await tx.Domains.ListAsync();
await tx.Domains.CreateAsync("mail.acme.com");
await tx.Domains.VerifyAsync(domainId);
await tx.Suppressions.ListAsync();
await tx.Suppressions.AddAsync(new SuppressionInput { Email = "bounce@example.net", Reason = "manual" });
await tx.Webhooks.ListAsync();
await tx.Webhooks.CreateAsync(new WebhookInput
{
Url = "https://api.acme.com/hooks",
Events = new[] { "email.delivered_to_mx" },
});
await tx.Inbound.RoutesAsync();
await tx.Usage.GetAsync();
await tx.Events.ListAsync(limit: 50);
Resources other than Emails.SendAsync return JsonElement so new fields do
not require an SDK release:
var messages = await tx.Messages.ListAsync(status: "bounced");
foreach (var message in messages.GetProperty("messages").EnumerateArray())
{
Console.WriteLine(message.GetProperty("id").GetString());
}
Attachments
await tx.Emails.SendAsync(new EmailMessage
{
From = "Notify <notify@mail.acme.com>",
To = new[] { "ada@example.net" },
Subject = "November invoice",
Html = "<p>Attached.</p>",
Attachments = new[] { Attachment.FromFile("invoice.pdf", contentType: "application/pdf") },
});
Webhooks
Verify the raw request body before deserializing it:
app.MapPost("/webhooks/transmitly", async (HttpRequest request) =>
{
using var reader = new StreamReader(request.Body);
var raw = await reader.ReadToEndAsync();
var signature = request.Headers["Transmitly-Signature"].ToString();
var secret = builder.Configuration["Transmitly:WebhookSecret"]!;
if (!TransmitlyClient.VerifyWebhook(raw, signature, secret))
{
return Results.BadRequest();
}
// Deserialize and handle only after the signature passes.
return Results.Ok();
});
Non-2xx responses throw TransmitlyException with Status, Code, Details
and Payload. Domain, webhook and inbound management require an API key with
the admin scope.
dotnet pack Transmitly/Transmitly.csproj -c Release
| 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 was computed. 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. |
-
net8.0
- No dependencies.
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.0 | 98 | 11/17/2026 |