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

Publish a community adapter

Build, publish, and list a third-party provider adapter without making it official.

Community adapters are third-party npm packages. They let someone support a provider without adding that provider to @opencoredev/email-sdk, the official CLI, or the official adapter maintenance surface.

That split is intentional:

Surface Who owns it Where it lives
Official adapter Email SDK maintainers @opencoredev/email-sdk/{adapter}
Community adapter The community package maintainer Their npm package, such as email-sdk-acme-mail
Community docs listing Email SDK docs, by pull request apps/fumadocs/content/community/plugins.json
Verified listing Email SDK docs, for one version Same registry entry plus verification metadata

Most community adapters should start as status: "community". That means listed, discoverable, and clearly third-party. It does not mean endorsed, bundled, or maintained by OpenCore.

Adapter or plugin?

An adapter is the provider implementation. It maps Email SDK’s normalized EmailMessage into one provider API request.

A plugin is the package-friendly wrapper. It registers the adapter through the plugins array, which is the cleanest setup for reusable community packages.

Ship both. The plain adapter keeps advanced users close to the provider. The plugin wrapper gives most users a stable one-line integration.

Publishing path

  1. Create a separate package owned by the community maintainer.
  2. Implement the adapter contract from Create an adapter.
  3. Export both the adapter factory and plugin factory.
  4. Publish the package to npm from the maintainer’s own repo.
  5. Add a short README with install, setup, field support, and test instructions.
  6. Optionally open a pull request to list the package in the Email SDK community registry.

Do not add community adapters to packages/email-sdk/src, the official adapter catalog, the official CLI adapter list, or the official package exports unless the project has agreed to maintain that provider as official.

Export both forms

Export a plain adapter factory and an adapter plugin factory from the package root.

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

Package exports

Community packages should use Email SDK as a peer dependency. That keeps apps from installing two copies of the core types.

Avoid install scripts and binaries. Adapter packages should be boring library packages: importable code, types, tests, and provider docs.

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

Example:

Thing Example
Package email-sdk-acme-mail
Adapter acme-mail
Plugin ID acme-mail
Env var ACME_MAIL_API_KEY
Export acmeMail, acmeMailPlugin

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.

Use a small table in the package README:

Field Support Notes
html, text Yes Sent as provider body fields.
cc, bcc Yes Mapped to provider recipient fields.
replyTo No Throws when provided.
headers No Provider does not support custom headers.
attachments No Throws when provided.
tags Yes Mapped to provider tags.
metadata Partial Included when values are strings.
idempotencyKey No Provider does not expose this feature.

This is not paperwork. Field support determines whether the adapter is safe as a fallback route. A backup provider that silently drops attachments or reply-to addresses can make a send look successful while changing the email.

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 for the community package and @opencoredev/email-sdk.
  • Minimal createEmailClient example.
  • Required environment variables.
  • Field support table.
  • Error behavior for unsupported fields.
  • Test command.
  • Link to Email SDK adapter contract.
  • Link to the provider API docs used by the adapter.

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

List it in Email SDK docs

After publishing to npm, the maintainer can open a pull request that adds an entry to apps/fumadocs/content/community/plugins.json.

Then run:

That check validates the registry shape. In CI, verified and official entries also get a published package metadata check. Community entries are listed as third-party packages without verification metadata.

Community, verified, or official?

Status Use it when…
community A third-party maintainer published the package and wants discoverability.
verified A specific published version passed the registry verification checklist.
official The adapter is maintained by OpenCore or ships in this repository.

Verification applies to one version. If the package releases again, the registry should keep the old verifiedVersion until the new version is reviewed.

What not to do

  • Do not publish under the @opencoredev scope.
  • Do not ask users to import from @opencoredev/email-sdk/{community-provider}.
  • Do not add provider secrets or live credentials to examples.
  • Do not hide provider limitations behind successful sends.
  • Do not mark a listing verified before a package version has actually passed verification.
  • Do not mark a third-party package official.

Next

Last updated on