惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 聂微东
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
C
Check Point Blog
M
MIT News - Artificial intelligence
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
DataBreaches.Net
大猫的无限游戏
大猫的无限游戏
D
Docker
Last Week in AI
Last Week in AI
IT之家
IT之家
F
Fortinet All Blogs
A
About on SuperTechFans
P
Proofpoint News Feed
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog RSS Feed
博客园_首页
月光博客
月光博客
博客园 - 司徒正美
Y
Y Combinator Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Email Marketing Automation in 2026: 5 Tools (and 1 Self-H...
TrackStack · 2026-05-25 · via DEV Community

I've wired up email automation in 5 different SaaS products over the last 3 years. Every time the team asks "Mailchimp or…?" — and every time the right answer depends on whether you actually need marketing campaigns, transactional sends, or both. This post is the version of that conversation aimed at people who'd rather see a curl than a pricing table.

The decision tree

What are you sending?
├── Transactional only (receipts, password resets, magic links)
│   → Resend / Postmark / SES (skip the rest of this post)
│
├── Marketing only (newsletters, campaigns, drips)
│   → Brevo (free, has API), MailerLite ($10/mo), 
│     or Listmonk (self-hosted)
│
└── Both, from the same tool
    → Brevo (unique combo at this price)
    │ or
    → Klaviyo (if e-commerce)
    │ or
    → ActiveCampaign Plus + transactional add-on ($$$)

Enter fullscreen mode Exit fullscreen mode

The "both from the same tool" path is where most teams over-engineer. Splitting transactional (Resend) and marketing (anything) is usually cheaper and gives better deliverability — but harder to manage one source of truth on the contact.

The platforms, briefly

Brevo — best free, decent API, dual-purpose

300 emails/day on free, unlimited contacts, basic automation. Bills by emails sent, not contacts — a huge win if you have a big inactive list. Their REST API supports both transactional sends and marketing list management:

// Add contact to a list AND send transactional welcome — one Node script
import fetch from "node-fetch";

const BREVO_KEY = process.env.BREVO_API_KEY;

async function onboardUser(email, name) {
  // 1. Add to marketing list
  await fetch("https://api.brevo.com/v3/contacts", {
    method: "POST",
    headers: {
      "api-key": BREVO_KEY,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      email,
      attributes: { FIRSTNAME: name },
      listIds: [3],          // "New users" list
      updateEnabled: true,    // upsert
    }),
  });

  // 2. Fire transactional welcome
  await fetch("https://api.brevo.com/v3/smtp/email", {
    method: "POST",
    headers: {
      "api-key": BREVO_KEY,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      to: [{ email, name }],
      templateId: 7,           // your template
      params: { firstName: name },
    }),
  });
}

Enter fullscreen mode Exit fullscreen mode

Two API calls, both authenticated by the same key. Most platforms force you to pay for separate transactional infrastructure (Mailgun/Postmark) plus marketing — Brevo bundles them.

MailerLite — clean UI, decent API, smaller free

500 subscribers on free (cut from 1,000 in September 2025), 12k emails/month, automation builder included. API is straightforward but transactional is a separate paid product (MailerSend). For just marketing, the API works well; the value prop is the editor more than the API.

ActiveCampaign — best automation, API is verbose

No free plan, $15/month entry for 1,000 contacts on Starter. The automation builder is the industry benchmark. The API works but it's REST in a 2010 sense — endpoints for everything, lots of object types (contact, deal, tag, list, automation, custom field, etc.). You'll write more code per integration than you would on Brevo or Klaviyo. Use it only when your team has bought into ActiveCampaign for the automation power, not for API DX.

Klaviyo — event-driven, the best dev API

Klaviyo's free tier is small (250 contacts, 500 emails/month), but their API is the cleanest of the bunch and built around events, not lists. You don't "add a contact to a campaign" — you push events, and segmentation rules on Klaviyo's side decide who gets what:

// Track an event — Klaviyo handles segmentation + automation triggers
import fetch from "node-fetch";

await fetch("https://a.klaviyo.com/api/events/", {
  method: "POST",
  headers: {
    Authorization: `Klaviyo-API-Key ${process.env.KLAVIYO_KEY}`,
    "Content-Type": "application/json",
    revision: "2024-10-15",
    accept: "application/json",
  },
  body: JSON.stringify({
    data: {
      type: "event",
      attributes: {
        properties: {
          OrderID: "ORD-12345",
          Total: 89.99,
          Items: ["sku-001", "sku-007"],
        },
        metric: { data: { type: "metric", attributes: { name: "Placed Order" } } },
        profile: { data: { type: "profile", attributes: { email: "user@example.com" } } },
      },
    },
  }),
});

Enter fullscreen mode Exit fullscreen mode

That single event triggers any automation Klaviyo has set up for "Placed Order" — receipt, cross-sell sequence, review request 7 days later, whatever. This is why Klaviyo dominates e-commerce: shops want event-driven, not list-driven thinking, and the API matches.

HubSpot Marketing Hub — only if HubSpot is your CRM

2k emails/month on free, $20/month Starter, then a $890/month cliff to Professional. The API is solid (HubSpot has invested heavily) but you're paying for the whole CRM bundle. Don't pick HubSpot Marketing standalone — pick HubSpot if you already use their CRM.

Listmonk — the self-hosted answer

Listmonk is open-source, Go-based, single-binary or Docker. No task counter, no contact limit, no premium feature gates. Drop this on a $6 VPS:

# docker-compose.yml
services:
  db:
    image: postgres:16-alpine
    restart: unless-stopped
    environment:
      - POSTGRES_PASSWORD=listmonk
      - POSTGRES_USER=listmonk
      - POSTGRES_DB=listmonk
    volumes:
      - listmonk-data:/var/lib/postgresql/data

  app:
    image: listmonk/listmonk:latest
    restart: unless-stopped
    ports:
      - "9000:9000"
    depends_on:
      - db
    environment:
      - TZ=Europe/Kyiv
    volumes:
      - ./config.toml:/listmonk/config.toml

volumes:
  listmonk-data:

Enter fullscreen mode Exit fullscreen mode

config.toml points at the Postgres above plus an SMTP provider (Amazon SES, Mailgun, or even Gmail for testing). The API is JSON, well-documented, and supports lists, subscribers, campaigns, and transactional templates.

What you don't get out of the box: visual automation builder (you wire campaigns to send on a schedule or trigger them via the API yourself), abandoned-cart logic, behavioral segmentation as deep as Klaviyo. What you get: complete control, $5/month total cost, no vendor lock-in. For SaaS founders running small lists who'd rather write code than fight a SaaS UI, this is the play.

Transactional vs marketing — the split most teams should make

A common mistake: picking one tool to do both because "it's simpler." Reality:

  • Transactional (receipts, password resets, magic links): low volume per user but mission-critical, must arrive in <30s, can't go to spam. Postmark, Resend, SES, Mailgun are purpose-built. Sending IP reputation is managed for transactional separately.
  • Marketing (campaigns, drips, newsletters): bulk send, latency doesn't matter, deliverability is shared-IP territory until you scale.

Mixing them on the same shared IP means a bad marketing campaign (spam complaints) can throttle your password-reset deliverability. Brevo and ActiveCampaign run separate infrastructure for the two even though they're one product. Klaviyo doesn't do transactional at all.

The split most teams should make: Resend or Postmark for transactional ($0–10/month at SaaS scale), Brevo or Listmonk for marketing. Two integrations, both small.

API quality, ranked

Based on my actual integration experience, not vendor copy:

  1. Klaviyo — clean REST, event-first, excellent docs, sane errors, generous rate limits (75 req/sec)
  2. Brevo — clean REST, both transactional and marketing under one key, docs OK
  3. HubSpot — surprisingly good, OAuth flow is well-supported, schema is large but consistent
  4. ActiveCampaign — works, but verbose; many endpoints, inconsistent response shapes between v1 and v3
  5. Mailchimp — works, but the segmentation API is genuinely painful (string-based filter syntax that's easy to get wrong)
  6. Listmonk — clean and simple, but smaller surface area than the SaaS APIs; some features exist only in the UI

Common pitfalls

Double opt-in vs API adds. Most platforms have a "skip double opt-in when added via API" setting, but the default usually requires confirmation. If your onboarding flow assumes the contact is immediately on the list, configure this explicitly or your welcome sequence won't fire.

Idempotency on contact creation. Re-running an integration test can create duplicate contacts. Brevo's updateEnabled: true, Klaviyo's profile upsert by email, and Mailchimp's MD5-hashed-email subscriber ID all solve this — but you have to use them. Default behaviour is often "error on duplicate," not "merge."

Rate limits. Klaviyo gives you 75 req/sec; Brevo 400 req/min; ActiveCampaign 5 req/sec. Bulk imports need throttling. The Mailchimp batch endpoint exists for a reason — use it instead of looping single calls when adding more than a few hundred contacts.

Webhook signature verification. All these platforms support outbound webhooks (e.g., "campaign sent," "contact unsubscribed"). All of them sign payloads. Verify before processing — it's not optional. The pattern's the same as Stripe or HubSpot HMAC.

Custom fields and types. Spreadsheets and JSON have loose types; CRMs are strict. A blank "" is not null, a "yes" is not a true, a "$1,200" isn't 1200. Normalize before API call. This burns more integration time than auth setup.

TL;DR

  • Marketing only, free + good API: Brevo. 300/day, unlimited contacts, REST that doesn't make you cry.
  • Marketing + transactional, one bill: Brevo again. Rare combo at this price point.
  • E-commerce, event-driven: Klaviyo. The best API of the bunch, period.
  • Already on HubSpot CRM: HubSpot Marketing Hub Starter.
  • Hate vendors, love Docker: Listmonk on a $6 VPS.
  • Avoid: Mailchimp (API is dated) unless your team is already locked in.

For SaaS founders specifically, the split I'd recommend in 2026 is Resend (transactional) + Brevo (marketing) + a webhook into your app, total ~$10–20/month at small scale. You'll spend less time fighting tooling and more time on the actual product.


Originally published on trackstack.tech with the SMB-perspective comparison table and FAQ.