I just launched gradients.sh. Come check it out →
Email SDK
Reference

Plugin API

Exact plugin context, hooks, middleware, adapter registration, and typed client extension contracts.

EmailPlugin

Plugin ids are unique. Adapter registration and client extensions run synchronously during construction.

Plugin context

addAdapter rejects duplicate route names.

Hooks

Hook exceptions are swallowed. Use them only for best-effort observation.

Middleware

beforeSend may replace the message and/or send options. Middleware exceptions become EmailMiddlewareError with a phase.

Multiple beforeSend middleware entries run in order. Replacement options shallowly merge into the current options.

Client extensions

extendClient returns an object merged into the client. The resulting extension type is the intersection of every plugin extension.

Reserved-key collisions throw EmailValidationError during construction.

Create a plugin

Build a typed middleware and extension example.

On this page