MailCraft
Home Pricing Docs
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

  1. Sign in and open Mail Agents.
  2. Click New Mail Agent (e.g. production-auth or billing-receipts).
  3. Open the API Keys tab and generate a Send Mail Token (raw_key is revealed once—store it securely).

Step 2: Add & Verify Your Sending Domain

  1. Navigate to Sending Domains and add a domain such as mail.example.com.
  2. Publish the generated DKIM TXT, Bounce CNAME, SPF TXT, and DMARC TXT records in your DNS provider.
  3. 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.