v0.1.0¶
Release Date: 2026-10-07
First release of OmniMail, a vendor-free Go core for transactional email:
verification links, security notices, receipts and other mail an application
sends as itself. Applications program against one Sender interface and a
validated Message. The deployment chooses the delivery provider, so
applications never import a vendor SDK. The core uses only the Go standard
library.
Highlights¶
- One interface for every provider:
Sendertakes a validatedMessageand returns aSendResultor a classified*Error. - Safe by default:
- addresses are validated with
net/mail, internationalized addresses are accepted, and CR/LF and control characters are rejected in every header value; - templates autoescape HTML, fail on missing keys, and keep subjects to one line.
- Errors you can act on: every failure has a
Kind, andIsRetryableandRetryAftertell callers whether and when to try again. - Built-in senders: SMTP for production,
slogfor development, and memory for tests. - A conformance suite for adapters:
providertestis the bar every provider adapter must pass.
New Features¶
- Message model
Address,ParseAddressandParseAddressList.Message: To/Cc/Bcc, Reply-To, subject, text and HTML bodies, custom headers, tags and an idempotency key.Validaterejects missing recipients or bodies, reserved headers, and header injection.
- Sending
Sender,SendResultandSenderFunc.
- Errors
ErrorwithKind: invalid message, invalid address, rejected, throttled, transient, auth or unknown.- Sentinel errors for
errors.Is, plusTemporary,Retryable,KindOf,IsRetryableandRetryAfter.
- MIME
BuildMIMEassembles RFC 5322 single-part ormultipart/alternativemessages with 7bit, quoted-printable or base64 bodies.- It also writes RFC 2047 encoded headers, folds long headers, and sets
DateandMessage-ID.
- Templates
Templaterenders subject, text and HTML from strings or anfs.FS.
smtp- An SMTP sender with required STARTTLS or implicit TLS, and AUTH PLAIN/LOGIN.
- Timeouts, context cancellation, SMTPUTF8 checks, and reply codes mapped to error kinds.
smtp/smtptest- An in-process SMTP server for tests, with TLS, AUTH, failure injection and stalls.
logsender- Writes messages to
slog. Bodies are redacted by default.
- Writes messages to
memsender- Captures messages for tests, with injectable failures.
providertest- The conformance suite (
RunAll,Harness), withDecodeMIMEto check what an adapter sent.
- The conformance suite (
Providers¶
| Provider | Package | Status |
|---|---|---|
| SMTP | github.com/plexusone/omnimail/smtp |
Available |
| Log (development) | github.com/plexusone/omnimail/logsender |
Available |
| Memory (tests) | github.com/plexusone/omnimail/memsender |
Available |
| AWS SES v2 | github.com/plexusone/omni-aws/omnimail |
Planned |
| SendGrid | github.com/plexusone/omni-twilio/omnimail |
Planned |
| Gmail API | github.com/plexusone/omni-google/omnimail |
Planned |
Vendor adapters live in their own modules next to the vendor SDK, so applications that don't select a provider never download its SDK.
Documentation¶
Requirements¶
Go 1.26 or later.
What's Next¶
Provider adapters, starting with Amazon SES v2 in omni-aws, each verified
by the providertest conformance suite.