Open source · MIT licensed · Vercel-ready

Transactional email.
Your infrastructure.

Mail Engine sends real welcome emails, OTPs, password resets, and order confirmations through your own Resend, Brevo, or SMTP account. No vendor lock-in. No dummy responses.

  • No VPS required
  • 10 responsive templates
  • Typed API & Node SDK
Inbox — welcome email
A

Acme Inc <hello@acme.com>

Welcome aboard, John 👋

now

Welcome to Acme, John

Your account is ready. Use the code below to verify your email address and finish setting up.

418902

This code expires in 10 minutes.

Verify email
Sent with Mail Engine · You received this because you signed up.
accepted 142 ms
delivered via Resend

Works with the provider you already pay for

  • Resend
  • Brevo
  • SMTP / Nodemailer
  • Gmail
  • Outlook
  • SendGrid
  • Mailgun
  • Amazon SES

Features

Everything you need to ship production email

Stop rebuilding SMTP glue, email HTML, and retry logic in every project. Mail Engine gives you one clean, secure, provider-agnostic layer.

Bring your own provider

Plug in Resend, Brevo, or any SMTP server. A single provider interface keeps your app portable — switch providers by changing one environment variable.

10 polished templates

OTP, welcome, password reset, email verification, contact confirmations, order receipts, account activity, and more — responsive, branded, and ready to send.

Typed REST API + SDK

A Bearer-authenticated JSON API with Zod validation and clear status values, plus an official Node.js SDK so your send calls are fully type-safe.

Serverless on Vercel

Built for Node.js functions: no VPS, no persistent filesystem, no Docker. Every send awaits your provider and returns the real provider result.

Secure by default

Locked From address, HTML-escaped variables, constant-time key comparison, per-IP rate limits, and logs that never expose OTPs or tokens.

Delivery webhooks

Receive delivered, bounced, and complaint events from your provider with signature verification, so you always know what actually reached the inbox.

How it works

From app event to inbox in one request

Your application stays clean. Mail Engine handles authentication, validation, templating, and the provider hand-off.

  1. 01

    Configure your provider

    Add your Resend, Brevo, or SMTP credentials and a verified sender address as environment variables. No SDK juggling or per-provider code.

  2. 02

    Call one endpoint

    POST a template name, recipient, and variables. Authentication, request limits, and input validation happen before anything is rendered.

  3. 03

    Ship real email

    Mail Engine renders a responsive template, sends it through your provider, and returns the real message ID and status — never a fake success.

request-lifecycle.log
01Your applicationPOST /api/v1/emails/send
02Auth · Zod validation · Rate limitBearer sk_live_…
03Template engineHandlebars · HTML-escaped
04Provider adapterResend · Brevo · SMTP
05Result200 accepted · messageId
3delivery adapters
10responsive templates
18passing unit tests
MITfree for commercial use

Templates

Ten emails you will never have to design again

Every template accepts your logo, brand color, company name, footer, support email, and website URL. User variables are escaped automatically.

Auth

OTP verification

One-time passwords with expiry copy and a large, scannable code block.

otp
Auth

Password reset

A clear, single-action reset link with safety guidance and expiry notice.

password-reset
Auth

Email verification

Friendly confirmation with a branded call to action and fallback URL.

email-verification
Onboarding

Welcome email

Make a strong first impression right after registration.

welcome
Onboarding

Account created

Confirm the account and summarize what happens next.

account-created
Onboarding

Account activity

Alert users to new sign-ins or sensitive account changes.

account-activity
Support

Contact thank-you

Auto-reply to form submissions so nobody wonders if it sent.

contact-thank-you
Support

Admin notification

Route form details to your team with the visitor's reply-to address.

contact-admin-notification
Commerce

Order confirmation

Receipt-style summary with line items, totals, and order details.

order-confirmation
Utility

Generic notification

A flexible content template for everything else your product needs.

generic-notification

Shared variables: company_name support_email app_url logo_url brand_color year. Send your own with the REST API or Node SDK.

Developer experience

One endpoint. Any language.

Send templated email with a short JSON request and get an honest, structured response back.

curl -X POST https://your-mail-engine.com/api/v1/emails/send \
  -H "Authorization: Bearer $MAIL_ENGINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "welcome",
    "to": "customer@example.com",
    "variables": {
      "name": "John",
      "company_name": "Acme Inc"
    }
  }'
200 OK Response
{
  "success": true,
  "status": "accepted",
  "messageId": "r_1234567890",
  "message": "Email accepted by Resend"
}

Endpoints

  • GET/api/health
  • POST/api/v1/emails/send
  • GET/api/v1/templates
  • POST/api/v1/emails/test
  • POST/api/v1/webhooks/provider
  • GET/api/v1/usage

Security

Built to handle the emails that matter most

OTPs and password resets are a direct line into your users' accounts. Mail Engine treats them that way.

  • Bearer API key required on every send endpoint, compared in constant time.
  • The From address is locked to your verified sender — visitors can never spoof it.
  • Template variables are HTML-escaped by default to block injection.
  • OTPs, reset tokens, passwords, and API keys are never written to logs.
  • Per-IP rate limiting with standard X-RateLimit headers on all endpoints.
  • Webhook signatures verified before delivery events are trusted.

FAQ

Questions, answered

Everything developers ask before wiring up transactional email.

Read the full documentation
Do I need my own email provider?

Yes. Mail Engine is not an SMTP server and does not provide unlimited sending. You connect your own Resend, Brevo, or any SMTP account, and Mail Engine handles templates, validation, authentication, and delivery calls.

Is Mail Engine really free?

Mail Engine is MIT licensed and free for personal and commercial use. You only pay your email delivery provider for the messages you send.

Can I deploy it on Vercel?

Yes — it is designed for Vercel Node.js serverless functions. Import the repository, add your provider credentials and API key as environment variables, and deploy. No VPS or persistent filesystem is required.

Which languages can integrate with it?

Any language that can make an HTTP request. Official examples ship for Node.js, React + Vite, Java, PHP, and plain HTML forms, plus a type-safe Node.js SDK.

How is sending kept secure?

Every send endpoint requires a Bearer API key compared in constant time, the From address is locked to your verified sender, template variables are HTML-escaped, requests are rate limited, and OTPs, tokens, and API keys are never logged.

Do I have to write email HTML myself?

No. Ten responsive templates cover OTP verification, welcome, password reset, email verification, contact confirmations, admin notifications, order confirmations, account creation, account activity, and generic notifications.

Get started

Send your first real email in minutes

Clone the repository, add your provider key, and deploy. Your SMTP. Your emails. One simple engine.

MIT licensed · No credit card · No lock-in