Email Relay
Private email-sending API
What this is
A small, private email relay used by my own applications to send transactional mail — account confirmations, password resets, notifications and receipts. An application hands a message to one HTTPS endpoint, and the relay delivers it through an upstream SMTP provider.
There is no sign-up, no mailbox and no web interface for sending mail. If you arrived here by accident, there is nothing for you to do — you are welcome to close this page.
What this is not
- Not a public API — every request must carry a private token.
- Not a mailbox — it never receives or stores incoming mail.
- Not for bulk or marketing email; it is rate-limited and monitored.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /health |
Liveness and readiness probe used by the uptime check. |
| POST | /api/send-email |
Send one message. Requires an x-relay-token header. |
For authorised clients
A token is issued per project. Send a JSON body describing the message, with the token
in the x-relay-token header — requests without a valid token are rejected
with 401, and an unconfigured relay answers 503.
Bodies accept text, html, or both; send both and the
recipient’s client picks the richest version it supports.
curl -X POST https://relay.ahmedmohamed.org/api/send-email \
-H "Content-Type: application/json" \
-H "x-relay-token: YOUR_TOKEN" \
-d '{
"email": {
"to": "[email protected]",
"subject": "Hello",
"text": "Sent via the relay.",
"html": "<p>Sent via the <b>relay</b>.</p>"
}
}'