Skip to main content

Overview

Send emails to your audience using campaigns. Campaigns let you select a segment or tag as recipients, configure sender settings, and track results.
Email logs and tracking
Email sending in Migma is done through the Campaigns section, not from the Contacts page directly.

Quick Start

1

Create your email

Use Migma’s AI tools to create an email in the chat editor.
2

Set up your audience

Add contacts, organize with tags, and create segments from the Audience page.
3

Create a campaign

Go to Campaigns and create a campaign. Select your email, choose recipients (segment or tag), configure sender settings, and send or schedule.

Prerequisites

Email service provider required — configure an ESP before sending.
  • Connected email provider (Migma, Amazon SES, Resend, SendGrid, or Mailgun)
  • Verified sending domain
  • At least one contact with subscribed status

Setup Email Provider

Connect and configure your email service provider

Unsubscribe & Compliance

Migma handles compliance automatically:
  • Unsubscribe links are added to every marketing email
  • Clicking unsubscribe updates the contact’s status immediately
  • Unsubscribed contacts cannot receive marketing emails
  • Preference center lets subscribers manage their topic preferences

Send via API

Send emails programmatically via the SDK, CLI, or API. The from address determines your sending domain — it must be a verified domain. The optional providerType field selects which email service provider delivers the message. It defaults to migma (built-in sending).
No providerType needed — Migma sends by default. Use a verified sending domain (managed or custom).
await migma.sending.send({
  recipientType: 'email',
  recipientEmail: 'sarah@example.com',
  from: 'hello@yourcompany.migma.email',
  fromName: 'Your Company',
  subject: 'Welcome!',
  template: html,
  projectId: 'proj_123'
});

Transactional vs Marketing

Migma automatically infers the email type from how you send:
Send typeDefault behaviorExample
Single recipient (recipientType: 'email')TransactionalOrder confirmations, password resets
Batch (recipientType: 'audience', 'tag')MarketingNewsletters, promotions
Transactional emails bypass subscription status, skip topic filtering, and omit List-Unsubscribe headers. Bounced addresses are always excluded. This means single sends just work — no extra flags needed:
// Automatically treated as transactional — no flag needed
await migma.sending.send({
  recipientType: 'email',
  recipientEmail: 'customer@example.com',
  from: 'noreply@yourcompany.migma.email',
  fromName: 'Your Company',
  subject: 'Your order has shipped',
  template: html,
  projectId: 'proj_123'
});
For edge cases, use the transactional flag to override the default:
// Batch transactional: "Your subscription renews tomorrow" to all active users
await migma.sending.send({
  recipientType: 'tag',
  recipientId: 'tag_active_subscribers',
  from: 'noreply@yourcompany.migma.email',
  fromName: 'Your Company',
  subject: 'Your subscription renews tomorrow',
  template: html,
  projectId: 'proj_123',
  transactional: true
});
Only use transactional: true on batch sends for emails the recipient expects regardless of subscription status (renewal reminders, security alerts). Using it for promotional content violates CAN-SPAM and GDPR.

Next Steps