Documentation
Connect your Django app
Blink Mail exposes a Postal-compatible API via django-anymail. One tenant API key can send from any active domain on that tenant.
Get your API key from the operator console after a sending domain is activated. Log in
1. Install django-anymail
django-anymail[postal]>=10.0
2. Environment variables
Add to your app .env. The from-address must use an active sending domain on the tenant.
EMAIL_BACKEND=anymail.backends.postal.EmailBackend ANYMAIL_POSTAL_API_KEY=<tenant-api-token> ANYMAIL_POSTAL_API_URL=https://mailer.blink.mk DEFAULT_FROM_EMAIL=noreply@your-domain.com SERVER_EMAIL=noreply@your-domain.com
API URL is the base host only — no /api/v1 suffix.
3. Django settings
ANYMAIL = {
"POSTAL_API_KEY": os.environ.get("ANYMAIL_POSTAL_API_KEY"),
"POSTAL_API_URL": os.environ.get("ANYMAIL_POSTAL_API_URL", "https://mailer.blink.mk"),
}
DEFAULT_FROM_EMAIL = os.environ.get("DEFAULT_FROM_EMAIL")
SERVER_EMAIL = os.environ.get("SERVER_EMAIL", DEFAULT_FROM_EMAIL)
4. Verify
- Send a test email (e.g. password reset).
- Check delivery in Messages under the operator console.
- Wrong from-domain → 403. Quota exceeded → 429.
5. Postmaster alignment checklist
- Set DEFAULT_FROM_EMAIL to noreply@
(plain address, no display-name tricks). - For Google Postmaster, send a test to a personal @gmail.com inbox — not a Workspace address on your domain.
- In Gmail: Show original → confirm dkim=pass (d= matches your domain) and dmarc=pass.
- Operator CLI: python manage.py send_postmaster_test --to you@gmail.com --domain