Go SDK
The official Go client for the Nextmail API. One module with nothing outside the standard library, and one method for every endpoint.
What it is
One module over the whole API, from sending, templates and tracking to threads, contacts, domains, webhooks and disposable inboxes. It has a method for every method of the TypeScript SDK under the same name in Go casing, one error type with a sentinel for every kind of refusal, retries that cannot duplicate a send, and a webhook signature verifier. It needs Go 1.24 or later and nothing else.
go get github.com/bfzli/nextmail-gopackage main import ( "context" "log" "github.com/bfzli/nextmail-go") func main() { client := nextmail.New() _, err := client.Emails.Send(context.Background(), nextmail.Body{ "from": "Acme Billing <billing@acme.com>", "to": "ada@example.com", "subject": "Your September invoice", "html": "<p>Invoice attached.</p>", }) if err != nil { log.Fatal(err) }}Where to go
It wraps the same API as every other client
Everything here is the surface the API reference documents and the TypeScript SDK wraps, so read the API reference for what an endpoint does and this for how to call it from Go. Every TypeScript method has a Go twin, and the parity check of the module runs both with the same arguments and fails unless they send the same request.
Google Workspace