Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Axene Mailer SDKs

License: MIT npm NuGet Maven Central Built in Kenya

Official client libraries for Axene Mailer: professional email for Africa. Send receipts, confirmations, and campaigns from your own domain. Priced in KES, billed via M-Pesa.

This is a spec-driven monorepo: every client wraps the same public API (spec/openapi.json), so the libraries stay consistent across languages.

Language Package Registry Status
TypeScript / JavaScript @axene/mailer npm ✅ ready
.NET (C#) Axene.Mailer NuGet ✅ ready
Python axene-mailer PyPI ✅ ready
Java io.axene:mailer Maven Central ✅ ready
Rust axene-mailer crates.io ✅ ready
Ruby axene-mailer RubyGems ✅ ready
PHP axene/mailer Packagist 🚧 repo ready, submit to Packagist
Swift AxeneMailer SwiftPM (git tag) ✅ v0.1.0
Go axene git tag ✅ v0.1.0

Every client covers the same Core surface (emails, domains, contacts, suppressions, templates, webhooks), defined once in spec/SURFACE.md and spec/DESIGN.md and extracted from the live backend.

Git-based clients have their own repos because their consumers resolve from a repo root: Go (axene-mailer-go), Swift (axene-mailer-swift), and PHP/Packagist (axene-mailer-php). Their source is developed here under packages/ and mirrored to those repos on release.

Quickstart

TypeScript

npm install @axene/mailer
import { Axene } from '@axene/mailer';
const axene = new Axene({ apiKey: process.env.AXENE_API_KEY! });
await axene.emails.send({
  from: 'hello@yourdomain.com',
  to: 'customer@example.com',
  subject: 'Your receipt',
  html: '<p>Thanks for your order.</p>',
});

.NET

dotnet add package Axene.Mailer
using Axene.Mailer;
var axene = new AxeneMailerClient("axm_k_your_api_key");
await axene.SendAsync(new SendEmail {
    From = "hello@yourdomain.com",
    To = { "customer@example.com" },
    Subject = "Your receipt",
    Html = "<p>Thanks for your order.</p>",
});

Get an API key from your dashboard at mail.axene.io. Full docs: https://axene.io/docs/mailer/getting-started/welcome.

Releasing

Each package releases independently via a tag prefix (see .github/workflows/release.yml):

git tag ts-v0.1.0     && git push --tags   # -> npm
git tag dotnet-v0.1.0 && git push --tags   # -> NuGet
git tag py-v0.1.0     && git push --tags   # -> PyPI
git tag java-v0.1.0   && git push --tags   # -> Maven Central
git tag rust-v0.1.0   && git push --tags   # -> crates.io
git tag ruby-v0.1.0   && git push --tags   # -> RubyGems
git tag php-v0.1.0    && git push --tags   # -> Packagist (auto-sync on tag)
git tag swift-v0.1.0  && git push --tags   # -> SwiftPM resolves the tag
  • npm uses NPM_TOKEN (repo secret) + provenance.
  • NuGet, PyPI, and RubyGems use Trusted Publishing (OIDC), so no API keys are stored.
  • crates.io uses CARGO_REGISTRY_TOKEN for the first publish (which claims the crate name); switch it to OIDC once the crate exists.
  • Maven Central uses the Sonatype Central Portal (GPG-signed, io.axene).
  • Packagist auto-syncs from git tags via its webhook; SwiftPM resolves the git tag directly. Both release jobs only run tests as a gate.
  • Every release runs the package's tests before publishing.

Keeping the spec in sync

spec/openapi.json is the public surface of the Axene Mailer API (admin/internal routes are intentionally excluded). Regenerate it from the backend with scripts/export-spec.sh whenever the API changes.

Contributing

Contributions are welcome. The SDKs are spec-driven, so most changes start from spec/openapi.json. Open an issue to discuss larger changes, then send a pull request. Run the per-package test suites before submitting.

License

MIT © Axene Solutions

About

Official Axene Mailer SDKs for TypeScript and .NET.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages