context.Context for cancellation and deadlines, exports typed request/response models, and is safe for concurrent use.
pkg.go.dev
github.com/WazobiaMail/wazobiamail-goSource
WazobiaMail/wazobiamail-go
At a glance
Install
Configure
X-API-Key; use WithAccessToken for an account Bearer token. Pass a context.Context to every call.
Send your first email
IdempotencyKey in SendMessageRequest for safe retries. Use SendWithAttachments for binary files, or UploadAttachment to get a public URL first.
What you can do
Messages— send, multipart attachments, tracking/logs and spam checks.Domains— list/create/update/delete, DNS records, verification and Cloudflare DNS.Mailboxes— provisioning, credentials, storage and headless inbox messages.APIKeys,SMTP— scoped keys, relays and SMTP access.Billing,Units,Plans,Status— invoices, subscriptions, credits, limits and account health.Support,Templates— support threads and Enterprise templates.Webhooks— HMAC SHA-256 signature verification without a network call.
Spam-check scores
Messages.SpamCheck returns a penalty Score, a Threshold, an IsSpam flag and an inverse DeliverabilityScore (0–100, higher is better).
IsSpam is true when Score >= Threshold; read Threshold from the response instead of hard-coding 5.0. See Spam and deliverability scores.
Webhooks
VerifySignature accepts a hex HMAC SHA-256 value with an optional sha256= prefix.
Errors
APIError exposes StatusCode, Message, Code, Errors, Body and RetryAfter.
Concurrency
A*Client is safe for concurrent use and holds an *http.Client; reuse one instance across goroutines. Each request accepts a context, so cancel or time out individual calls without recreating the client.
