Your provider, your sender
Use the SMTP account you already pay for. Each message leaves from the sender address you configured, so mail keeps your domain and your reputation.
SMTP-to-REST email API
Connect your SMTP account once. Every application you run then sends through MailSetu with a single API key, and every send is logged with its outcome.
curl -X POST https://equivalent-alisa-spideyofficial777-c749c4c7.apps.mistral.run/v1/emails/send \
-H "Authorization: Bearer ms_live_…" \
-H "Content-Type: application/json" \
-d '{"smtp_id": 1, "to": ["customer@example.com"],
"subject": "Your order has shipped"}'
# 200 OK
{"status": "accepted_by_smtp", "message_id": "<7f3a@…>"}
import requests
res = requests.post(
"https://equivalent-alisa-spideyofficial777-c749c4c7.apps.mistral.run/v1/emails/send",
headers={"Authorization": "Bearer ms_live_…"},
json={
"smtp_id": 1,
"to": ["customer@example.com"],
"subject": "Your order has shipped",
"webhook_url": "https://yoursite.com/hook",
},
timeout=30,
)
print(res.status_code, res.json())
const res = await fetch("https://equivalent-alisa-spideyofficial777-c749c4c7.apps.mistral.run/v1/emails/send", {
method: "POST",
headers: {
"Authorization": "Bearer ms_live_…",
"Content-Type": "application/json",
},
body: JSON.stringify({
smtp_id: 1,
to: ["customer@example.com"],
subject: "Your order has shipped",
}),
});
console.log(await res.json());
Works with the SMTP provider you already use
Features
Use the SMTP account you already pay for. Each message leaves from the sender address you configured, so mail keeps your domain and your reputation.
Create an API key for each app and revoke it on its own. Keys are shown once and stored only as hashes.
See which messages your mail server accepted and which failed, with the reason, from the dashboard or the API.
Send HTML or plain text, add attachments, and use CC and BCC in one request. Dangerous file types are blocked before anything leaves the server.
Certificates are always verified, connections are time-limited, and private network addresses are refused unless you enable them.
One HTTPS POST with JSON. Send from your backend with cURL, Python, Node, or PHP. No templates to learn; you bring your own message body.
Pass webhook_url per request or bind one to your API key. Get instant
email.sent and email.failed events with zero extra secrets.
Send up to 50 personalized messages in one /v1/emails/batch call,
using per-recipient {{variables}}.
Pause or enable any SMTP account live from your dashboard, and verify SPF, DKIM, and DMARC records in one click.
API
Authenticate with a bearer key, name the SMTP account and sender, and send. A
200 means your mail server accepted the message. It does not confirm inbox delivery.
ms_live_…. Keep them on your server.from address are rejected.curl -X POST https://equivalent-alisa-spideyofficial777-c749c4c7.apps.mistral.run/v1/emails/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"smtp_id": 1,
"from": "no-reply@yourdomain.com",
"to": ["customer@example.com"],
"subject": "Your order has shipped",
"text": "Your order is on its way."
}'
import requests
response = requests.post(
"https://equivalent-alisa-spideyofficial777-c749c4c7.apps.mistral.run/v1/emails/send",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"smtp_id": 1,
"from": "no-reply@yourdomain.com",
"to": ["customer@example.com"],
"subject": "Your order has shipped",
"text": "Your order is on its way.",
},
timeout=30,
)
print(response.status_code, response.json())
const res = await fetch("https://equivalent-alisa-spideyofficial777-c749c4c7.apps.mistral.run/v1/emails/send", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.MAILSETU_API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
smtp_id: 1,
from: "no-reply@yourdomain.com",
to: ["customer@example.com"],
subject: "Your order has shipped",
text: "Your order is on its way."
})
});
console.log(res.status, await res.json());
How it works
Sign up and confirm your email address.
Enter your provider's host, port, and sender address, then test the connection.
Send with one request to /v1/emails/send.
A send marked as accepted means your mail server took the message. It does not confirm inbox delivery.
Bring your own SMTP account. Setup takes a few minutes.