I built a small email API for my own projects
Every product I ship needs the same few emails: a welcome after signup, a password reset, a receipt, an invite. Amazon SES is cheap and reliable, but wiring it up again for each project got old. So I built a thin layer o
Every product I ship needs the same few emails: a welcome after signup, a password reset, a receipt, an invite. Amazon SES is cheap and reliable, but wiring it up again for each project got old. So I built a thin layer on top of it for myself.
It is called Pigeon.
What it does
You add your domain, put a sending key in your app, and call the API (or plain SMTP). Amazon SES, in your own AWS account, does the delivery. Pigeon keeps the pieces around it: domain checks, keys, a log of each call, and a monthly plan, so a bounce or a limit shows up before a user writes in.
import { Pigeon } from "pigeon";
const pigeon = new Pigeon(process.env.PIGEON_API_KEY, {
baseUrl: "https://pigeonfs.com"
});
await pigeon.emails.send({
from: "Ada <[email protected]>",
to: ["[email protected]"],
subject: "Reset your password",
html: "<p>Choose a new password.</p>"
});
The same call exists in Python, Go, Java, Rust and Elixir.
Where it stands
This is a one-person prototype. I use it in my own projects, and it is not a finished product. I put it on Product Hunt to get honest feedback, not to claim more than it is.
What I would like to know
- Is the API shape clear enough?
- Would you use this instead of wiring SES yourself?
- What is missing before it is useful on day one?
Links
- Project: pigeonfs.com
- Product Hunt: Pigeon on Product Hunt
Comments here or on Product Hunt are very welcome.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.