Developers

SMTPy for Developers: Email Infrastructure as Code

REST API, webhooks, MCP Server — email tooling built for developers who refuse half-baked solutions.

Vos défis quotidiens

Creating per-tenant email aliases programmatically in multi-tenant SaaS apps

Testing email flows in development and CI without polluting real inboxes

Triggering real-time actions when emails arrive (webhooks)

Integrating email management into AI assistants via MCP

Ce que SMTPy résout pour vous

Full REST API

Create, update, and disable aliases via API key auth. Perfect for SaaS apps that provision a mailbox per user at signup — one POST call, done.

Real-time Webhooks

POST to your endpoint on every inbound email. Trigger Slack notifications, open support tickets, update your CRM, or kick off async workflows.

MCP Server for AI

Connect Claude, GPT-4o, and other LLMs to your email via the Model Context Protocol. Read, summarize, create aliases, and analyze delivery stats — from your AI assistant.

Isolated Testing Aliases

Spin up throwaway aliases in your CI pipeline. Test your registration flow, password reset, and notification emails without touching production inboxes.

Why Developers Choose SMTPy

Email in applications is traditionally painful: SendGrid for transactional, Postfix for receiving, a third-party service for aliases... SMTPy consolidates all of it into one coherent API.

REST API Examples

Create an alias

curl -X POST https://smtpy.fr/api/v1/aliases \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"local": "user-123", "domain_id": 1, "forward_to": "user@example.com"}'

List messages for an alias

curl https://smtpy.fr/api/v1/messages?alias_id=42 \
  -H "X-API-Key: your-api-key"

Webhooks: Real-time Email Processing

Register a webhook URL and receive a POST on every inbound email:

// Payload delivered to your endpoint
{
  "event": "email.received",
  "alias": "contact@yourdomain.com",
  "from": "client@example.com",
  "subject": "New order #4521",
  "body_text": "Hello...",
  "received_at": "2026-03-10T14:23:00Z"
}

MCP Server: AI-Assisted Email Management

SMTPy ships an MCP Server compatible with Claude, GPT-4o, and other LLMs. Your AI assistants can:

  • Read and summarize incoming emails
  • Create aliases on demand
  • Analyze delivery statistics
  • Reply to emails directly from the assistant

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "smtpy": {
      "command": "npx",
      "args": ["-y", "smtpy-mcp"],
      "env": {
        "SMTPY_API_KEY": "your-api-key",
        "SMTPY_URL": "https://smtpy.fr"
      }
    }
  }
}

Per-User Aliases in SaaS Apps

Provision a dedicated inbox for each user at signup:

# Python — create alias on user registration
import httpx

def create_user_email(username: str, user_email: str) -> str:
    resp = httpx.post(
        "https://smtpy.fr/api/v1/aliases",
        headers={"X-API-Key": SMTPY_API_KEY},
        json={
            "local": username,
            "domain_id": YOUR_DOMAIN_ID,
            "forward_to": user_email
        }
    )
    return f"{username}@yourdomain.com"

Isolated Email Testing in CI/CD

Create throwaway aliases per test run so CI email tests never touch production inboxes:

  • test-signup-{RUN_ID}@yourdomain.com — test the registration flow
  • test-reset-{RUN_ID}@yourdomain.com — test password reset
  • Disable or delete test aliases at the end of the pipeline

SMTPy's API makes this a two-liner in any CI environment.

"The SMTPy API is exactly what I needed: create an alias per tenant in one REST call, receive emails via webhook, and log everything cleanly. It replaces three separate services."

— Full-stack developer, Lyon

Commencez gratuitement

1 domaine, 10 alias, 100 emails/mois. Aucune carte bancaire requise.

Créer mon compte gratuit

© 2026 SMTPy. Tous droits réservés.