Skip to content

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: Sender takes a validated Message and returns a SendResult or 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, and IsRetryable and RetryAfter tell callers whether and when to try again.
  • Built-in senders: SMTP for production, slog for development, and memory for tests.
  • A conformance suite for adapters: providertest is the bar every provider adapter must pass.

New Features

  • Message model
    • Address, ParseAddress and ParseAddressList.
    • Message: To/Cc/Bcc, Reply-To, subject, text and HTML bodies, custom headers, tags and an idempotency key. Validate rejects missing recipients or bodies, reserved headers, and header injection.
  • Sending
    • Sender, SendResult and SenderFunc.
  • Errors
    • Error with Kind: invalid message, invalid address, rejected, throttled, transient, auth or unknown.
    • Sentinel errors for errors.Is, plus Temporary, Retryable, KindOf, IsRetryable and RetryAfter.
  • MIME
    • BuildMIME assembles RFC 5322 single-part or multipart/alternative messages with 7bit, quoted-printable or base64 bodies.
    • It also writes RFC 2047 encoded headers, folds long headers, and sets Date and Message-ID.
  • Templates
    • Template renders subject, text and HTML from strings or an fs.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.
  • memsender
    • Captures messages for tests, with injectable failures.
  • providertest
    • The conformance suite (RunAll, Harness), with DecodeMIME to check what an adapter sent.

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.