Freesend is a lightweight email API built for developers who want full control over email delivery without the complexity or cost of third-party platforms.
Self-host it on your own infrastructure and send emails through a simple HTTP API using your own SMTP provider (like Gmail, Zoho, Mailgun, etc.).
Designed with serverless apps, indie hackers, and backend engineers in mind, Freesend is powered entirely by your own SMTP server.
No vendor lock-in. No usage caps. No surprise pricing.
"I needed to send 1-2k emails/day from my serverless app. Freesend just worked — and saved me time and money."
~ A real user
Most email platforms either:
- Limit you to a few hundred free emails per month
- Charge a premium for usage-based pricing
- Lock you into their infrastructure
Freesend flips that model:
✅ Use Your Own SMTP
✅ Simple HTTP API
✅ Free & Open Source / Self-Hosted
Ideal for:
- Serverless apps that need reliable transactional emails
- Startups who want full transparency & control
- Developers who value simplicity and clean open-source code
Freesend is Resend SDK-compatible. If you're already using the resend npm package, switch to Freesend with one environment variable. Zero code changes.
# Just add this to your .env
RESEND_BASE_URL=https://your-freesend-instance.com/apiYour existing code works as-is:
import { Resend } from 'resend';
const resend = new Resend('YOUR_FREESEND_API_KEY');
await resend.emails.send({
from: 'hello@yourdomain.com',
to: 'user@example.com',
subject: 'Sent via Freesend',
text: 'Same Resend SDK. Your own SMTP. No vendor lock-in.',
});The Resend SDK reads
RESEND_BASE_URLfrom your environment and routes all requests to your Freesend instance instead of Resend's servers.
- ⚡ Easy HTTP API - Send email with just one
POSTrequest - 🔄 Resend SDK Compatible - Drop-in replacement, one env var to switch
- 📬 Full SMTP Control - Bring your own Gmail, Zoho, Outlook, or custom SMTP
- 📀 Attachments Support - Send PDFs, images, etc. via base64
- 📊 Send History Dashboard - Track every email with status (sent/failed/pending)
- 🧑💻 Minimal & Hackable - Fully open source and easy to extend
- 💬 Plain Text + HTML - Support for both formats out of the box
Deploy Freesend on your own infrastructure, then send emails via the API:
http://localhost:3000/api/send-email
const sendEmail = async () => {
const url = "http://localhost:3000/api/send-email";
const apiKey = "YOUR_API_KEY"; // From your Freesend instance dashboard
const emailData = {
fromName: "Your Company",
fromEmail: "hello@yourdomain.com",
to: "user@example.com",
subject: "Hello from Freesend!",
html: "<h1>Welcome!</h1>",
text: "Welcome!",
};
const res = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${apiKey}`,
},
body: JSON.stringify(emailData),
});
const result = await res.json();
console.log(result);
};
sendEmail();Use an official SDK for a better developer experience.
| Language | Install | Documentation |
|---|---|---|
| JavaScript/TypeScript | npm install @freesend/sdk |
JS/TS SDK docs |
| Python | pip install freesend |
Python SDK docs |
- Seamlessly send transactional emails from your JAMstack or serverless app — signups, OTPs, receipts & more
- Use Gmail SMTP to avoid setting up Postfix or Mailgun
- Replace expensive email APIs with your own hosted function
- Maintain full data ownership of your outbound emails
Freesend uses Vitest for testing.
# Run all tests
npm test
# Run tests in watch mode
npm run test:watchTests are located in the tests/ directory. When contributing, please add tests for new endpoints and business logic.
Freesend is growing because of awesome developers like you! If you're interested in:
- Improving the UI / UX
- Implementing new features
- Adding templating support
...open a PR or drop a discussion! 💬
- grovv.app – A spreadsheet‑powered sales CRM for SMBs that uses Freesend to send transactional emails.
- mar.toolhub.live – A certificate generation platform for MAR point submissions, using Freesend to deliver 1,000–2,000 official, QR-verified emails daily via Gmail SMTP.
Want to be listed? Open a PR!
This project is licensed under the MIT License.