LeadRails
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

  1. Visit https://postmarkapp.com and sign up (free tier: 100 emails/month for testing; paid starts at $15/mo for 10k emails).
  2. After sign-up, you land in your first "Server" — Postmark uses servers as logical email-sending containers.
  3. The default server is fine for getting started; create more later if you want to separate domains.

Verify your sending domain

  1. Settings → Sender Signatures → click "Verify Domain".
  2. Add the DNS records Postmark prompts for (SPF, DKIM, optional Return-Path).
  3. Wait 5–15 min for DNS propagation, then click "Verify".
  4. Once verified, you can send from any address @yourdomain.com.

Get your Server Token

  1. Server → API Tokens tab.
  2. Click "Show server token" or generate a new one.
  3. Copy the token — looks like 1a2b3c4d-5e6f-7890-abcd-ef0123456789 (a UUID).
  4. This token is server-scoped, NOT account-scoped — it can only send from this one Postmark server.

Set up your destination in LeadRails

  1. Sign in → Destinations → New.
  2. Adapter type: Email — Postmark.
  3. Server token: paste from Postmark.
  4. From address: a verified address on your Postmark domain (e.g. leads@yourdomain.com).
  5. From name (optional): Your Brand Name displayed in inbox.
  6. Recipient template: {{email}} (uses the lead's email by default).
  7. Subject template: e.g. New lead: {{name}}.
  8. 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.
  9. Plain-text body (optional): fallback for clients that don't render HTML. If omitted, Postmark auto-strips the HTML.
  10. 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.
  11. 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

  1. Open the destination → Advanced → Verify connection.
  2. LeadRails hits Postmark's /server endpoint to confirm the token is valid (no test email sent).
  3. Green checkmark = ready.

Send a test email

  1. Sources → your source → Settings → ensure a route exists to your Postmark destination.
  2. Click "Send test event".
  3. A real email lands in the configured recipient inbox within seconds (Postmark is fast — sub-second typically).
  4. 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.
← All destination guides