Skip to content

Repository files navigation

SendPulser

A .NET client for the SendPulse email API: mailing lists and contacts, campaigns, templates, senders, blacklist, tags, balance, transactional email over SMTP and webhooks, with typed models for every documented payload.

Targets net8.0 and net10.0. Trimming and Native AOT compatible: no reflection-based serialization, no runtime dependencies in the core package beyond Microsoft.Extensions.Logging.Abstractions.

Packages

Package What it gives you
SendPulser.Abstractions Interfaces, models, options and exceptions. Reference this from your domain code and mock everything.
SendPulser The client itself: HTTP pipeline, OAuth handling, service implementations.
SendPulser.DependencyInjection AddSendPulser(...) on IServiceCollection, wired through IHttpClientFactory.
SendPulser.Resilience Retry, client-side rate limiting and timeouts tuned to the SendPulse quotas.
SendPulser.AspNetCore Endpoints that receive SendPulse webhooks as typed events.

All five ship together under one version.

Quick start

dotnet add package SendPulser.DependencyInjection
dotnet add package SendPulser.Resilience
builder.Services
    .AddSendPulser(builder.Configuration.GetSection(SendPulserOptions.SectionName))
    .AddSendPulserResilience();
public sealed class WelcomeMailer(ISendPulserClient sendPulse)
{
    public Task SendAsync(string email, CancellationToken cancellationToken) =>
        sendPulse.Smtp.SendAsync(
            new SendEmailRequest
            {
                Subject = "Welcome",
                Html = "<p>Glad to have you.</p>",
                From = new EmailAddress("hello@example.com", "Example"),
                To = [new EmailAddress(email)],
            },
            cancellationToken);
}

Documentation

Page Covers
Getting started Installing, registering the client, first request, conventions
Configuration Options, configuration keys, HTTP pipeline, tokens, logging
Errors and resilience Exception types, rate limits, retries, timeouts
Mailing lists and contacts Address books, contacts, variables, email address lookups
Campaigns Creating, scheduling, statistics, status codes
Templates Listing, reading, creating, editing
Account Senders, blacklist, tags, balance
SMTP Transactional email, bounces, unsubscribe list, sender domains
Webhooks Registering webhooks, receiving events, every event type
Releasing Versioning, tags, public API files, NuGet

Coverage

Every endpoint of the SendPulse bulk email service and SMTP service documentation is wrapped. Responses are typed; values SendPulse returns inconsistently (numbers as strings, flags as 0/1, tags as an object or an array, timestamps without a time zone) are normalised. Webhook events are typed per event name, and unknown events or unknown fields are preserved rather than dropped.

Samples

  • samples/SendPulser.Sample.Console: credentials from the environment, prints balance, senders, mailing lists and templates.
  • samples/SendPulser.Sample.Web: dependency injection, resilience and both webhook endpoints. Copy appsettings.example.json to user secrets.

Working on the library

See CONTRIBUTING.md for the build rules and SECURITY.md for reporting vulnerabilities.

License

MIT.

About

Modern async .NET client for SendPulse REST API (templates, address books, campaigns).

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages