Getting Started
Quickstart Guide
Configure your first Mail Agent, verify a sending domain, and send your first transactional email in 5 minutes.
Architecture Overview
MailCraft is a self-hosted Direct-MX transactional email engine organized around Account → Mail Agent → Sending Domain, isolating API credentials, rate limits, and deliverability telemetry cleanly.
Step 1: Create a Mail Agent
- Sign in and open Mail Agents.
- Click New Mail Agent (e.g.
production-authorbilling-receipts). - Open the API Keys tab and generate a Send Mail Token (
raw_keyis revealed once—store it securely).
Step 2: Add & Verify Your Sending Domain
- Navigate to Sending Domains and add a domain such as
mail.example.com. - Publish the generated DKIM TXT, Bounce CNAME, SPF TXT, and DMARC TXT records in your DNS provider.
- Click Verify DNS Now to confirm live propagation.
Step 3: Send Your First Email via REST API
curl -X POST https://api.mailcraft.local/v1.1/email \
-H "Authorization: Bearer maas_live_YOUR_API_KEY" \
-H "Idempotency-Key: order-10042-receipt" \
-H "Content-Type: application/json" \
-d '{
"from": { "address": "no-reply@mail.example.com", "name": "Example App" },
"to": [{ "address": "customer@example.org", "name": "Alex" }],
"subject": "Order #10042 Confirmed",
"htmlbody": "<h1>Thank you for your order</h1><p>We are preparing your shipment.</p>",
"textbody": "Thank you for your order. We are preparing your shipment."
}'
Example Response
{
"request_id": "req_01J...",
"message_id": "7f3a1c2e-8b4d-4f6a-9a10-32f9e0a1b2c3",
"message_id_header": "<7f3a1c2e@mail.example.com>",
"status": "queued",
"credits_used": 1,
"credits_remaining": 19999,
"recipients": [
{ "address": "customer@example.org", "status": "queued" }
]
}
Step 4: Inspect Per-Recipient Traces
Open Email Logs or call GET /v1.1/email/{message_id} to inspect per-recipient delivery status, remote MX host, TLS negotiation, and raw SMTP enhanced status codes.