SMTP API
The Overton.cloud SMTP API lets you send email over a simple HTTPS endpoint using JSON — no need to open and maintain a traditional SMTP connection.
The API is ideal for applications, scripts and serverless functions that need to send transactional mail without managing an SMTP socket. It authenticates with your existing Overton.cloud credentials: your server hostname, email username, and password.
Endpoint & Authentication
Send a POST request with a JSON body to:
https://smtpapi.mxroute.com/
Authentication is included in the request body. You provide:
- server — your server hostname (e.g.
mail.yourdomain.com). - username — your full email address.
- password — that account’s password.
Always use HTTPS
All requests must be made over HTTPS. Never hardcode credentials in your source — load them from environment variables or a secrets manager instead.
Request Fields
Every request must include the following fields:
| Field | Description |
|---|---|
server | Your server hostname. |
username | Full email address used to authenticate. |
password | The account password. |
from | Sender address. |
to | Recipient address (single recipient). |
subject | Subject line (plain text only). |
body | Message body. HTML formatting is accepted. |
Example Request
POST / HTTP/1.1
Host: smtpapi.mxroute.com
Content-Type: application/json
{
"server": "mail.yourdomain.com",
"username": "you@yourdomain.com",
"password": "your-password",
"from": "you@yourdomain.com",
"to": "recipient@example.com",
"subject": "Hello from the API",
"body": "<p>This message was sent over HTTPS.</p>"
}
Sending with cURL
curl -X POST https://smtpapi.mxroute.com/ \
-H "Content-Type: application/json" \
-d '{
"server": "mail.yourdomain.com",
"username": "you@yourdomain.com",
"password": "'"$MAIL_PASSWORD"'",
"from": "you@yourdomain.com",
"to": "recipient@example.com",
"subject": "Hello from the API",
"body": "<p>This message was sent over HTTPS.</p>"
}'
Sending with Python
import os
import requests
resp = requests.post(
"https://smtpapi.mxroute.com/",
json={
"server": "mail.yourdomain.com",
"username": "you@yourdomain.com",
"password": os.environ["MAIL_PASSWORD"],
"from": "you@yourdomain.com",
"to": "recipient@example.com",
"subject": "Hello from the API",
"body": "<p>This message was sent over HTTPS.</p>",
},
)
print(resp.json())
Responses
A successful send returns:
{ "success": true }
A failed send returns success: false with a descriptive error message explaining what went wrong:
{ "success": false, "error": "Authentication failed" }
Limitations
- Single recipient per request — make a separate call for each address.
- No attachments — the API sends text/HTML bodies only.
- Message size — keep messages within reasonable limits (typically under 10 MB).
- HTML in body only — subject lines must be plain text.
- Rate limiting — the service rate-limits requests to prevent abuse.