The mail your app has to send.
Sign-in codes, resets, receipts and invoices. One call each through the API or SMTP, and safe to retry.
A retry shouldn't send two receipts.
And a customer's reply shouldn't vanish into a no-reply address. The same key gets the first answer back, and events and replies come home.
your app
Send the receiptyour app, a retry
Same call, same keyhello@acme.dev
Your receipt for order 1042your webhook
sent, delivery, bounce and complaint, each signed.block list
A bounce or complaint stops the next send there.hello@acme.dev inbox
Her reply lands here, threaded with the receipt.your app
Send the receipta retry
Same call, same keyhello@acme.dev
Your receipt for order 1042your webhook
sent, delivery, bounce and complaint, each signed.block list
A bounce or complaint stops the next send there.hello@acme.dev inbox
Her reply lands here, threaded with the receipt.Sent once
The sameIdempotency-Keyreplays the first result, however long ago it was used. The SDKs add a key to every send.You hear back
Each delivery event posts to your webhook, signed, and is retried for 24 hours if your server is down.Replies come home
Send from an address with an inbox, and replies arrive threaded with the message they answer.
One call a message.
Copy one of 17 starter templates, or send your own text and HTML.
curl -X POST https://api.drin.run/v1/emails \
-H "Authorization: Bearer $DRIN_KEY" \
-H "Idempotency-Key: receipt-1042" \
-H 'content-type: application/json' \
-d '{
"from": { "email": "hello@acme.dev", "name": "Acme" },
"to": [{ "email": "maya@example.com" }],
"templateId": "<your saved receipt template>",
"data": { "brandName": "Acme", "firstName": "Maya", "orderNumber": "1042" }
}'
# 202 { "id": "6f1c…", "status": "queued" }import { verifyWebhook } from "@drin00/sdk";
export async function POST(req: Request) {
const raw = await req.text();
const { type, data } = verifyWebhook(
raw,
req.headers.get("drin-signature") ?? "",
process.env.DRIN_WEBHOOK_SECRET!,
).payload;
if (type === "delivery") await orders.markDelivered(data);
if (type === "inbound_received") await tickets.add(data);
return new Response(null, { status: 204 });
}Host smtp.drin.run
Port 587 (STARTTLS) or 465
Username an inbox address
Password an API keySend your first receipt today.
Try it on a test address first. Add your own domain when you're ready.