Codapult
PreisePluginsDoku
Codapult

Das SaaS-Boilerplate für Macher

Produkt

  • Preise
  • Plugins
  • Dokumentation

Unternehmen

  • Kontakt
  • GitHub

Rechtliches

  • Datenschutzrichtlinie
  • Nutzungsbedingungen

© 2026 Codapult. Alle Rechte vorbehalten.

Alle Artikel

Getting Started

  • Introduction
  • Quick Start
  • Project Structure

Configuration

  • Environment Variables
  • App Configuration

Authentication

  • Authentication
  • OAuth Providers
  • Two-Factor & Passwordless
  • Enterprise SSO (SAML)

Database

  • Database
  • Migrations

Teams

  • Teams & Organizations
  • Permissions & RBAC

Payments

  • Payments & Billing
  • Stripe Setup
  • LemonSqueezy Setup
  • Polar Setup
  • Payment Webhooks

Api

  • API Layer
  • tRPC
  • GraphQL

Ai

  • AI Features

Email

  • Email
  • Email Templates

Infrastructure

  • Infrastructure
  • File Storage
  • Background Jobs

Ui

  • UI & Theming

I18n

  • Internationalization

Content Management

  • Content Management

Admin

  • Admin Panel

Security

  • Security

Monitoring

  • Analytics & Monitoring

Modules

  • Module Architecture

Plugins

  • Plugin System
  • AI Kit Plugin
  • CRM Plugin
  • Helpdesk Plugin
  • Email Marketing Plugin

Deployment

  • Deployment
  • Troubleshooting

Upgrading

  • Upgrading Codapult

Developer Tools

  • MCP Server
  • Testing
Plugins

Email Marketing Plugin

Subscriber lists, audience segmentation, broadcast campaigns, open/click tracking, suppression, and AI-powered subject lines and content generation.

Overview

The Email Marketing plugin adds a complete campaign management system to your Codapult project. Your users can build subscriber lists, create audience segments with flexible conditions, send broadcast campaigns with scheduling, and track opens and clicks — plus generate subject lines and email content with AI.

Package: @codapult/plugin-email-marketing · Price: $39 (one-time)

Install with:

npx @codapult/cli plugins add @codapult/plugin-email-marketing

Features

Subscriber Lists & Contacts

Manage subscribers across multiple lists:

  • Contact management — CRUD operations on subscriber records with email, name, status, and metadata
  • Status tracking — contacts can be subscribed, unsubscribed, bounced, or cleaned
  • Source tracking — record how each contact was added (import, signup, API, manual)
  • Bulk import — CSV upload for importing large contact lists
  • Auto-sync — new users who sign up are automatically added as marketing contacts (via onUserCreated hook)
  • Multiple lists — create separate mailing lists per product, audience, or purpose
  • Default list — designate one list as the default for new contacts

Audience Segmentation

Build dynamic segments with rule-based conditions:

  • Condition builder — filter contacts by status, source, metadata fields, and custom attributes
  • JSON conditions — flexible, composable filter rules stored as JSON
  • Segment preview — see how many contacts match a segment before using it in a campaign
  • Campaign targeting — send campaigns to a specific list or segment

Broadcast Campaigns

Create and send email campaigns:

  • Template-based — compose campaigns using reusable email templates
  • List or segment targeting — send to an entire list or a specific segment
  • Scheduling — send immediately or schedule for a future date/time
  • Campaign lifecycle — draft → scheduled → sending → sent → cancelled
  • Per-campaign stats — open rate, click rate, bounce rate, and delivery metrics
  • Cancel support — cancel scheduled campaigns before they send

Email Templates

Reusable HTML templates for campaigns:

  • Template editor — create templates with subject line, HTML body, and optional JSON content blocks
  • Clone and customize — duplicate existing templates as a starting point
  • Template library — manage templates per organization

Open & Click Tracking

Automatic engagement tracking for every campaign:

  • Open tracking — invisible tracking pixel inserted in emails; records when a recipient opens
  • Click tracking — links in emails are automatically wrapped; records when a recipient clicks
  • Per-contact analytics — see which contacts opened and clicked per campaign
  • Campaign-level metrics — aggregate open rate, click rate, and unique engagement counts
  • Link management — tracked links stored per campaign with click counts

Suppression & Unsubscribe

Compliance and deliverability management:

  • Global suppression list — bounced, unsubscribed, and complained addresses per organization
  • Automatic enforcement — suppressed addresses are excluded from all campaign sends
  • Unsubscribe links — included in all campaign emails automatically
  • Reason tracking — record why an address was suppressed (bounce, unsubscribe, complaint)

AI Content Tools

Generate and improve email content with AI:

  • Subject line generation — generate up to 5 subject line variants for A/B testing
  • Content generation — create full email body content from a brief/description
  • Content improvement — improve existing email copy while maintaining brand voice
  • Generation history — all AI generations are stored for reference (type, prompt, result, accepted flag)

Analytics

Campaign and organization-level reporting:

  • Campaign stats — opens, clicks, bounces, deliveries per campaign
  • Org overview — aggregate metrics across all campaigns
  • Engagement trends — track engagement over time

Dashboard Pages

The plugin adds 6 pages under /dashboard/email/:

PagePathDescription
Contacts/dashboard/email/contactsSubscriber list with search and filters
Lists & Segments/dashboard/email/listsMailing list and segment management
Campaigns/dashboard/email/campaignsCampaign list with status and metrics
Campaign Detail/dashboard/email/campaigns/[id]Single campaign with stats and send log
Templates/dashboard/email/templatesEmail template management
Analytics/dashboard/email/analyticsCross-campaign reporting dashboard

API Routes

All routes are served under /api/plugins/email-marketing/. The plugin registers 35 API routes including:

  • GET|POST|PUT|DELETE /contacts + POST /contacts/import + POST /contacts/unsubscribe — contact management
  • GET|POST|PUT|DELETE /lists + POST /lists/contacts/add|remove — list management
  • GET|POST|PUT|DELETE /segments + GET /segments/preview — segment builder
  • GET|POST|PUT|DELETE /templates — template management
  • GET|POST|PUT|DELETE /campaigns + POST /campaigns/send|schedule|cancel + GET /campaigns/stats — campaign lifecycle
  • GET /track/open + GET /track/click — public tracking endpoints (pixel and redirect)
  • GET|POST|DELETE /suppression — suppression list management
  • GET /analytics/overview — org-level metrics
  • POST /ai/subject-lines + POST /ai/content + POST /ai/improve — AI content generation

Database Tables

The plugin creates 10 tables prefixed with em_:

TablePurpose
em_contactSubscribers: email, name, status, source, metadata
em_listMailing lists per org with cached contact count
em_list_contactMany-to-many list–contact membership
em_segmentNamed segments with JSON rule conditions
em_templateReusable templates: subject, HTML, optional JSON content
em_campaignCampaigns: targeting, schedule, status, template/list/segment
em_sendPer-recipient send record: status, open/click timestamps
em_campaign_linkTracked links per campaign with click counts
em_suppressionSuppressed addresses per org with reason
em_ai_generationAI generation history (type, prompt, result, accepted)

Environment Variables

VariableDefaultDescription
EM_FROM_EMAIL—Default sender email (falls back to core EMAIL_FROM)
EM_FROM_NAME—Default sender display name
EM_AI_MODELgpt-4o-miniModel for AI subject lines and content
EM_TRACKING_DOMAIN—Custom host for open/click tracking URLs
EM_BATCH_SIZE100Recipients per send batch
EM_RATE_LIMIT10Sends per second (match your email provider limits)

Integration with Core Modules

ModuleHow Email Marketing Uses It
sendEmail()Deliver campaigns via the host email adapter (Resend)
enqueueEmail()Queue batched, rate-limited campaign delivery
Vercel AI SDKSubject line generation, content generation, improvement
logActivity()Audit trail for imports, sends, suppressions, AI actions
checkOrgQuota()Enforce emailContacts and emailSends resource limits
onUserCreatedAuto-create marketing contact when a new user signs up
onUserDeletedCleanup/detach marketing data for deleted users
Helpdesk PluginDeployment