The @sypnia/mail package
One npm package with subpaths for servers, templates and webhooks.
| Import | For |
|---|---|
@sypnia/mail/server | servers: send, sendBatch, cancel, events, suppressions, domains, verifyWebhook |
@sypnia/mail/templates | rendering a template locally with data, for tests and previews |
@sypnia/mail/react | writing templates as React components (<Email>, <Button>, <Section>) that render to e-mail-safe HTML |
npx @sypnia/mail | the CLI |
import { createMail } from '@sypnia/mail/server';
const mail = createMail({ apiKey: process.env.SYPNIA_MAIL_KEY! }); // or { baseUrl } for your engineThere is no browser subpath: sending needs a secret key, so it always happens on a server, in a Sypnia Run function, or from Sypnia Data’s auth. ESM with types, Node 20+, Bun and Deno.