Email API reference
Send HTML emails and one-time codes from any website, app, server or ESP32 with one HTTPS request. No sign-up, no API key.
Droom Dazlean Solutions (DDS) runs this API. Please read the fair-use limits first: it is for transactional email, not newsletters.
Base URL
Use https://email.droomdazlean.com. Bodies may be JSON (any content type) or form data. CORS is open, so you can call it from a browser; never put your own app password in public JavaScript.
Send an email
POST /send
| Field | Required | Description |
|---|---|---|
to | Yes | Receiver. Several: comma-separated |
html | Yes | Email content: HTML with inline CSS |
subject | No | Subject line (keep it under about 60 characters) |
from_name | No | Name the receiver sees, for example "My Shop" |
reply_to | No | Where replies should go |
sender_email + app_password | No | Send from your own account (both are needed). Otherwise our shared sender is used |
smtp_host, smtp_port | No | Only with your own account. Default smtp.gmail.com, 587 (465 = SSL) |
layout | No | card (default) or plain |
redirect | No | For plain HTML forms: page to return to, with ?status=sent or ?status=error |
curl -X POST https://email.droomdazlean.com/send \
-H "Content-Type: application/json" \
-d '{"to": "[email protected]", "subject": "Welcome",
"from_name": "My Shop", "html": "<p>Thanks for signing up.</p>"}'
Success (200):
{"status": "sent", "message": "Email sent successfully.", "account": "default", "warnings": []}
Failure (400): {"status": "error", "message": "…"}. account is custom when your own account sent the email.
Python
import requests
r = requests.post("https://email.droomdazlean.com/send", json={
"to": "[email protected]", "subject": "Your receipt",
"html": "<p>Payment received. Thank you.</p>"})
print(r.json())
PHP
$ch = curl_init("https://email.droomdazlean.com/send");
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["to" => "[email protected]",
"subject" => "Hello", "html" => "<p>Hello</p>"])]);
echo curl_exec($ch);
One-time codes
POST /api/send-otp emails a code in a ready-made template. Fields: to (or email), optional otp (your own code), length (4 to 10), expires_minutes, app_name, purpose. It returns an otp_id.
POST /api/verify-otp checks a code: send otp and otp_id (or to). It returns {"valid": true} or {"valid": false, "message": "…"}. Each code can be tried at most 5 times and used once.
Other endpoints
| Request | What it does |
|---|---|
POST /preview | Returns the final HTML exactly as it will be sent, without sending |
GET /client.js | Browser helper: DDSEmail.send(), DDSEmail.template(), DDSEmail.check() |
GET /health | Health check: {"status": "ok"} |
GET /api/routes | Routes, fields and HTML rules as JSON |
Email HTML rules
- Inline CSS only;
<style>is converted to inline and scripts are removed. - Tables for layout, one column, at most 600 px wide.
- Icons as PNG images or emoji; buttons as styled links.
- Every email gets a short Droom Dazlean notice saying it is an automated message.
Limits and deliverability
The shared sender is a Google account, so Google's daily sending limit applies to all users together; use your own account for volume. Requests are limited to 25 MB. We cannot promise inbox placement. To send from your own domain, set up SPF, DKIM and DMARC with your email provider.
Help
Full guide with ESP32 examples: email.droomdazlean.com. Questions: [email protected]. Terms: API terms and acceptable use.