The mail.sb Send API lets you send email from your mail.sb mailbox over HTTP. Authenticate with your mailbox credentials, POST your message, and the API delivers it via SMTP. Full documentation and an interactive test form are available at api.mail.sb.
Quick Start
Send a POST request to https://api.mail.sb/send with Content-Type: application/json:
curl -X POST https://api.mail.sb/send \
-H "Content-Type: application/json" \
-d '{
"sender_name": "Your Name",
"sender_address": "[email protected]",
"password": "your_mailbox_password",
"recipient_name": "Recipient",
"recipient_address": "[email protected]",
"mail_subject": "Hello",
"mail_body": "<h1>Hi!</h1><p>HTML email works.</p>"
}'
Required Fields
| Field | Description |
|---|---|
sender_name | Your display name |
sender_address | Your mail.sb email (also used as SMTP login) |
password | Your mailbox password |
recipient_name | Recipient display name |
recipient_address | Recipient email |
mail_subject | Subject line |
mail_body | Email body (HTML tags allowed) |
HTML Email Guidelines
- Send body-only HTML fragments, not full documents. Do not wrap in
<!DOCTYPE><html><head><body>— the API auto-strips document shells, but clean fragments render best. - Use inline styles (
style="...") instead of<style>blocks — style block content leaks into the plaintext alternative that some email clients display. - Allowed tags: p, a, br, strong, em, b, i, u, ul, ol, li, h1-h6, div, span, table, tr, td, th, blockquote, pre, code, img, hr, small, del, ins.
- Stripped for security: script, iframe, form, object, embed.
Response Format
Always returns application/json:
// Success (HTTP 200)
{"success": true, "message": "Email sent successfully."}
// Error (HTTP 400/403/422/429)
{"success": false, "message": "SMTP error: Could not authenticate."}
Rate Limits
- 30 sends per hour / 100 per day — per IP address
- 50 sends per hour / 200 per day — per sender address
The API also accepts application/x-www-form-urlencoded for backward compatibility. Your password is sent directly to the SMTP server for authentication and is never stored. For issues, contact [email protected].
Comments (0)
No comments yet. Be the first!
Leave a comment