Docs navigation
Email via Postmark
Send each lead as a transactional email through your own Postmark account. You bring the Postmark server token + sending domain; LeadRails dispatches the message. You own your sending reputation.
Why you provide your own Postmark account
- We could host sending for you, but if one of your customers (or one of your customers' customers) sends bulk unsolicited mail, our entire sending IP reputation tanks — and so does every other LeadRails customer's deliverability.
- By using YOUR Postmark account, you own your reputation. Your bounce rates, complaint rates, and engagement metrics are yours to manage. Your deliverability problems don't become anyone else's.
- Postmark also has a partner program — if you sign up via [our affiliate link — placeholder; the user will add the real URL later], we get a small kickback that funds LeadRails development.
Sign up for Postmark
- Visit https://postmarkapp.com and sign up (free tier: 100 emails/month for testing; paid starts at $15/mo for 10k emails).
- After sign-up, you land in your first "Server" — Postmark uses servers as logical email-sending containers.
- The default server is fine for getting started; create more later if you want to separate domains.
Verify your sending domain
- Settings → Sender Signatures → click "Verify Domain".
- Add the DNS records Postmark prompts for (SPF, DKIM, optional Return-Path).
- Wait 5–15 min for DNS propagation, then click "Verify".
- Once verified, you can send from any address
@yourdomain.com.
Get your Server Token
- Server → API Tokens tab.
- Click "Show server token" or generate a new one.
-
Copy the token — looks like
1a2b3c4d-5e6f-7890-abcd-ef0123456789(a UUID). - This token is server-scoped, NOT account-scoped — it can only send from this one Postmark server.
Set up your destination in LeadRails
- Sign in → Destinations → New.
- Adapter type:
Email — Postmark. - Server token: paste from Postmark.
- From address: a verified address on your Postmark domain (e.g.
leads@yourdomain.com). - From name (optional):
Your Brand Namedisplayed in inbox. - Recipient template:
{{email}}(uses the lead's email by default). - Subject template: e.g.
New lead: {{name}}. -
HTML body template: the message body. Mustache-style variables
(
{{name}},{{phone}},{{utm_source}}) get substituted at delivery time. Note: the form is currently a single-line input — paste a single-line HTML template, or use the API for multi-line templates. - Plain-text body (optional): fallback for clients that don't render HTML. If omitted, Postmark auto-strips the HTML.
- Message stream (optional): defaults to your server's "outbound" stream. Use a different stream if you have separate streams for broadcast vs transactional in Postmark.
- Click Create.
Available variables
-
Top-level lead fields:
{{name}},{{email}},{{phone}},{{company}},{{source_url}},{{utm_source}},{{utm_campaign}}, etc. -
Nested access:
{{lead.email}},{{event.event_id}}. - Missing variables resolve to empty string (don't throw).
Example subject: New lead from {{utm_source}}: {{name}}
resolves to New lead from google: Jane Doe.
Verify connection
- Open the destination → Advanced → Verify connection.
- LeadRails hits Postmark's
/serverendpoint to confirm the token is valid (no test email sent). - Green checkmark = ready.
Send a test email
- Sources → your source → Settings → ensure a route exists to your Postmark destination.
- Click "Send test event".
- A real email lands in the configured recipient inbox within seconds (Postmark is fast — sub-second typically).
- Postmark's Activity → Outbound logs the message.
Troubleshooting
401 / 422 + "UnauthorizedRequest"- Server token is wrong. Re-copy from Postmark.
422 + "InactiveRecipientsError"- Postmark hard-bounced this recipient previously. They're on Postmark's suppression list. Either bypass via Postmark's API to re-activate, or use a different test recipient.
422 + "InvalidEmailRequest"- Subject empty, body empty, or from_address not verified in Postmark. Check all three.
- Sender signature error
- from_address is on a domain you haven't verified in Postmark. Visit Settings → Sender Signatures.
- High bounce rate alerts in Postmark
- Your lead-event data has bad emails. Use lead validation in your source form, or filter at the LeadRails route layer.
Your responsibilities
- You are the sender of record. Anti-spam compliance (CAN-SPAM, CASL, GDPR consent for EU recipients) is yours to manage.
- Postmark requires confirmed-opt-in for marketing sends. Lead-routing emails count as transactional, but if you send anything that looks like marketing, follow Postmark's content policies.
- Postmark's Bounce / Spam Complaint webhooks let you handle bounces upstream — wire them into your source form to prevent re-sending to known bad addresses.