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

Publish a community adapter

Ship a third-party provider adapter as its own npm package and list it in the Email SDK community registry.

This guide takes an adapter you have built (see Create an adapter) to a published npm package with a listing in the community registry. Community adapters stay third-party: you own the package and the provider relationship; the registry makes it discoverable.

Surface Who owns it Where it lives
Official adapter Email SDK maintainers @opencoredev/email-sdk/<adapter>
Community adapter You Your npm package, e.g. email-sdk-acme-mail
Registry listing Email SDK docs, by pull request apps/fumadocs/content/community/plugins.json

Do not add community adapters to the SDK source, CLI, or exports. That path is for providers the project has agreed to maintain as official.

Name and scaffold the package

Follow the naming conventions so users can predict every identifier from the provider name:

Thing Convention Example
Package email-sdk-{provider} email-sdk-acme-mail
Adapter provider slug acme-mail
Plugin id same slug acme-mail
Env var uppercase slug + key ACME_MAIL_API_KEY
Exports {provider} and {provider}Plugin acmeMail, acmeMailPlugin

Never publish under the @opencoredev scope, and never tell users to import from @opencoredev/email-sdk/{your-provider}.

Export both the adapter and its plugin

Export the plain adapter factory for users who want direct control, and the plugin wrapper for the one-line setup most apps use:

Declare @opencoredev/email-sdk as a peer dependency. A regular dependency can give apps two copies of the core types, and the registry’s CI audit rejects packages without the peer dependency:

Keep the package boring: no preinstall/install/postinstall scripts, no binaries, minimal runtime dependencies. Verified listings are audited for all three.

Document field support in the README

Field support determines whether your adapter is safe as a fallback route, so the README must state how each EmailMessage field behaves: mapped, or rejected with an error.

Field Support Notes
html, text Yes Sent as provider body fields.
cc, bcc Yes Mapped to provider recipient fields.
replyTo Yes Mapped to reply_to.
headers No Throws EmailValidationError.
attachments No Throws EmailValidationError.
tags Yes Mapped to provider tags.
metadata No Throws EmailValidationError.
idempotencyKey No Provider has no idempotency support.

Round out the README with: install command, a minimal createEmailClient example, required env vars, the test command, and links to the adapter contract and the provider’s API docs.

Cover the package with tests

Beyond the adapter unit tests from Create an adapter (payload mapping, error retryability, unsupported-field rejection, AbortSignal forwarding), add one test proving the plugin registers through createEmailClient:

Publish to npm

Publish from your own repository. Enable npm provenance or trusted publishing; it is required if you ever want the listing upgraded to verified.

Open the registry PR

Add an entry to apps/fumadocs/content/community/plugins.json in the Email SDK repo:

All listed fields except pluginId and importName are required; adapter is required for adapter and hybrid entries, and href/repo must be https URLs. Names, packages, and plugin ids must be unique across the registry.

Validate before pushing:

CI runs the same check. For verified and official entries it additionally audits the published npm tarball: repository match, the peer dependency, no install scripts, no binaries, and an unchanged runtime dependency count.

Listing statuses

Status Meaning
community Listed and discoverable, clearly third-party. The default for new packages.
verified One published version passed the verification audit; requires verifiedVersion plus verification metadata in the entry.
official Maintained by OpenCore or shipped in this repository. Not for third-party packages.

Verification applies to a single version. After a new release, the entry keeps the old verifiedVersion until someone reviews the new one. Never mark a listing verified ahead of an actual review.

Next

Last updated on