Datamailer is a standalone Django mailing service that gives you full control over your email infrastructure. It handles audience management, campaign sending, transactional email delivery, open/click tracking, unsubscribe flows, and bounce/complaint processing — all backed by Amazon SES and designed to serve multiple client applications from a single deployment.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DataTalksClub/datamailer/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Get Datamailer running locally in minutes with demo data and a working API.
Configuration
Configure environment variables for SES, SQS, Postgres, and your domain.
API Reference
Explore the full REST API for contacts, subscriptions, and transactional email.
Core Concepts
Understand the data model: organizations, audiences, clients, and contacts.
What Datamailer Provides
Datamailer covers the full lifecycle of email delivery for multiple client applications sharing a single infrastructure:Audience Management
Shared global contact identity with per-audience, per-client subscription state. Tags, verification, and validation per contact.
Campaign Sending
Staff-authored campaigns with recipient snapshots, include/exclude tag filters, and per-recipient status tracking.
Transactional Email
Template-based transactional sends for registration, password reset, and verification — with idempotency keys and suppression checks.
Engagement Tracking
Open pixels, click redirects, unsubscribe tokens, and SES webhook processing for bounces, complaints, and deliveries.
Client API
Bearer-authenticated REST API for client apps to sync contacts, check subscription state, and trigger transactional sends.
Import & Export
Bulk JSON and CSV import with idempotent upserts, Mailchimp export migration, and full contact CSV export.
Architecture at a Glance
Django Web App
Serves the operator UI, client REST API, public tracking endpoints, and SES webhook ingress. Runs on a single ARM instance with Gunicorn and WhiteNoise.
Postgres
Source of truth for all contact, subscription, campaign, transactional, and event data. Provides full audit history and campaign reporting.
SQS Queues
Durable buffers for transactional sends, campaign batches, SES webhook events, and tracking events — each with a dead-letter queue and CloudWatch alarms.
Lambda Workers
Bursty campaign sender, transactional sender, and SES webhook processor. Scales to zero between sends; conservatively concurrency-bounded to protect Postgres connections.
Getting Started
Run Locally
Clone, install dependencies, seed demo data, and explore the operator UI and API.
Deploy to AWS
CloudFormation-based deployment to EC2, RDS, SQS, Lambda, and SES.
Integrate a Client App
Create a client, generate a Bearer API key, and start syncing contacts.
Send Transactional Email
POST to
/api/transactional/send with a template key and recipient email.