Platform services
The Email service lets your services send transactional email. It exposes send functions that other services can call, and delivers the messages through a provider — currently Postmark.
What it does
Email is a function-oriented service: it exposes named functions that the rest of your project can call. Dreambase delivers a FUNCTION_CALL eventto the service's webhook, and the service sends the requested message through the provider.
Providers
- Postmark — transactional email via a shared or dedicated Postmark server, with send, batch send, and delivery-stats functions plus health checks and metrics.
NestJS on Vercel
The Email service is a NestJS application deployed as a Vercel serverless function, following the same pattern as the other Dreambase integrations. Each provider handles its own webhook route (e.g./postmark/webhook).Endpoint
POST
Postmark handler — challenge, deployment, health, metrics & function calls/postmark/webhookFunctions it exposes
sendEmail(aliassend) — send a single email withto,subject, and anhtmlBodyand/ortextBody.fromdefaults to the configured sender signature.sendEmails(aliassendBatch) — send a batch, taking amessagesarray or atolist with a shared subject and body.getDeliveryStats— return outbound delivery statistics.
A function call arrives as an event shaped like this:
POST /postmark/webhook
{
"name": "FUNCTION_CALL",
"functionCall": {
"name": "sendEmail",
"arguments": {
"to": "user@example.com",
"subject": "Welcome",
"htmlBody": "<h1>Hello, World!</h1>"
}
}
}Events it handles
WEBHOOK_CHALLENGE— echo the challenge back to verify the endpoint.DEPLOYMENT_CREATED/DEPLOYMENT_DELETED— verify the token and publish (or remove) the connection outputs.HEALTH_CHECK/METRIC_UPDATE— report reachability and delivery metrics.FUNCTION_CALL— dispatch to a send function and deliver via the provider.
Wire it into any service
Because Email is exposed as functions, any service in your design can send mail — a sign-up flow, an alerting worker, a billing job — without embedding email credentials of its own. The Email service holds the provider configuration and your other services just callsendEmail.