Skip to content
You're viewing documentation for v0.4.0. It may be out of date.Go to latest
Email SDK
Esc
↑↓navigate↵open⌘Jpreview
On this page

Publish a community adapter

Package a custom adapter for other Email SDK users.

Community adapters should feel like built-in adapters: predictable names, clear field support, narrow dependencies, and a plugin export for clean setup.

Adapter packages follow the same registry process as other plugins. Start with Publish a community plugin, then add the adapter-specific requirements on this page.

Export both forms

Export a plain adapter factory and an adapter plugin factory.

The plain adapter keeps advanced users close to the provider. The plugin form gives most apps the cleanest setup:

Package exports

Use a peer dependency for Email SDK so apps do not accidentally install two copies of the core types.

Naming

Thing Recommendation
Package email-sdk-{provider}
Adapter Provider slug, such as acme-mail
Plugin ID Same slug unless you need variants
Env var Provider slug in uppercase, plus key
Export {provider} and {provider}Plugin

Document field support

Every adapter README should say whether these fields are supported:

  • html and text
  • cc, bcc, and replyTo
  • headers
  • attachments
  • tags
  • metadata
  • idempotencyKey

If a field is not supported, say whether the adapter throws. Community adapters should throw on unsupported non-empty fields instead of dropping them.

Include a smoke test

At minimum, test:

  1. Payload mapping.
  2. Response mapping.
  3. Unsupported field errors.
  4. AbortSignal forwarding.
  5. Plugin registration through createEmailClient.

README checklist

  • Install command.
  • Minimal createEmailClient example.
  • Required environment variables.
  • Field support table.
  • Error behavior for unsupported fields.
  • Test command.
  • Link to Email SDK adapter contract.

Keep the README short enough that a user can decide if the adapter fits their fallback route.

Last updated on