Drive email entirely from Node.js: send with one call, receive every inbound message as parsed JSON on a webhook, and give any app or AI agent its own inbox on a domain you control — with no mail server to run.
Add the Node.js library:
npm install mailkite One endpoint, one API key — over your own authenticated domain. Send API reference →
import { MailKite } from "mailkite";
const mk = new MailKite(process.env.MAILKITE_API_KEY);
const { id, status } = await mk.send({
from: "hello@myapp.ai",
to: "ada@example.com",
subject: "Your invoice #1042",
html: "<p>Thanks! Receipt attached.</p>",
}); Point your domain's MX at MailKite and every message arrives as parsed JSON — verify the signature, then handle it. No IMAP, no mail server.
import express from "express";
import { MailKite } from "mailkite";
const SECRET = process.env.MAILKITE_WEBHOOK_SECRET;
const app = express();
app.use("/hooks/mailkite", express.raw({ type: "application/json" }));
app.post("/hooks/mailkite", (req, res) => {
if (!MailKite.verifyWebhook(req.headers["x-mailkite-signature"], req.body, SECRET)) {
return res.sendStatus(401);
}
const event = JSON.parse(req.body.toString("utf8"));
// ...handle event.type === "email.received"
// Confirm receipt: returns the JSON body {"status":"ok"}.
res.type("application/json").send(MailKite.replyOk());
}); Go deeper: Parse inbound email to JSON in Node, or give an AI agent its own inbox.
Send, receive, and agent inboxes — the same shape in every language. See the full picture →
Unlimited domains ·Unlimited mailboxes ·3,000 emails/mo — 100 emails/day. Pricing →