Skip to content

The @sypnia/mail package

One npm package with subpaths for servers, templates and webhooks.

Applies to EngineCloud
View as Markdown
ImportFor
@sypnia/mail/serverservers: send, sendBatch, cancel, events, suppressions, domains, verifyWebhook
@sypnia/mail/templatesrendering a template locally with data, for tests and previews
@sypnia/mail/reactwriting templates as React components (<Email>, <Button>, <Section>) that render to e-mail-safe HTML
npx @sypnia/mailthe CLI
TypeScript
import { createMail } from '@sypnia/mail/server';
const mail = createMail({ apiKey: process.env.SYPNIA_MAIL_KEY! });   // or { baseUrl } for your engine

There 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.

    Search pages, sections and terms