MailPace
Send through the MailPace API, a deliberately minimal adapter for address fields and body content.
Capabilities
| Repeated headers | Idempotency | Scheduling | Personalized |
|---|---|---|---|
| No | none | No | expanded |
These values come from the adapter's exported capabilities declaration. The field support matrix covers normalized message fields.
The MailPace adapter calls the MailPace send API with plain fetch. It has the smallest adapter surface in the SDK: addresses, subject, and body only, with recipient lists serialized as comma-separated strings.
Configure
Create a server token in the MailPace dashboard and verify the sending domain.
import { createEmailClient } from "@opencoredev/email-sdk";
import { mailpace } from "@opencoredev/email-sdk/mailpace";
export const email = createEmailClient({
adapters: [mailpace({ apiKey: process.env.MAILPACE_API_KEY! })],
});Prop
Type
Send
MailPace maps cc, bcc, and replyTo alongside html/text (sent as htmlbody/textbody). That is the whole surface, which makes it a good fit for sign-in alerts, receipts, and other plain notifications.
const result = await email.send({
from: "Acme <hello@acme.com>",
to: "user@example.com",
replyTo: "support@acme.com",
subject: "New sign-in to your account",
text: "A new sign-in from Berlin, Germany was detected. If this was not you, reset your password.",
});
console.log(result.id); // MailPace message id (`id` or `message_id` in the response)No headers, attachments, tags, or metadata
MailPace's send endpoint takes none of these, so any of them throws an EmailValidationError
before a request is made. Check your production message shape against the field support
matrix before routing through MailPace as a fallback.
Verify from the CLI
MAILPACE_API_KEY="..." npx email-sdk doctor --adapter mailpaceMAILPACE_API_KEY="..." npx email-sdk send \
--adapter mailpace \
--from "Acme <hello@acme.com>" \
--to user@example.com \
--subject "MailPace smoke test" \
--text "It works" \
--dry-runDrop --dry-run for one real send to confirm the token and verified domain work end to end.
