Overview
This API allows you to send emails via any SMTP server. You can provide all the required SMTP and email details either through the JSON request body or query parameters. Itβs simple, fast, and public.
Perfect for:
- Serverless websites (like Vercel, Netlify, or Cloudflare Workers)
- Frontend apps where you don't want to expose your SMTP credentials
- Quick email testing without setting up a backend
- Contact forms on static sites
Endpoint
POST /send-email
Accepts both JSON body and query parameters. You can also use GET requests for testing.
Request Example (JSON Body)
{
"smtp_host": "smtp.example.com",
"smtp_port": 587,
"smtp_secure": false,
"smtp_user": "your_email@example.com",
"smtp_pass": "your_password",
"from": "your_email@example.com",
"to": "receiver@example.com",
"subject": "Hello",
"html": "Hi there!
This is a test email.
"
}
Query Parameters Example
GET /send-email?smtp_host=smtp.example.com&smtp_port=587&smtp_secure=false&smtp_user=your_email@example.com&smtp_pass=your_password&from=your_email@example.com&to=receiver@example.com&subject=Hello&html=<h1>Hi there!</h1>
Response Example
{
"success": true,
"message": "Email has been sent successfully!"
}
Notes & Tips
- If using Gmail, create an App Password for SMTP.
- Supports both POST JSON body and query parameters.
- Great for frontend-only projects or static websites that need a quick email solution.
- No database or authentication required β just call the API.
- Works globally β you just need internet access.