AFI AFI

Mailtrain

Estimated reading: 2 minutes Updated July 31, 2026

Overview

AFI subscribes contacts to lists in Mailtrain, the self-hosted open-source newsletter platform, from WordPress form submissions. Capture leads into your self-hosted Mailtrain instance automatically.

Supported actions

  • Subscribe to List
  • Unsubscribe
  • Update Subscriber

Authentication

  1. Log in to your Mailtrain admin.
  2. Open Users > Your User > Access Tokens.
  3. Generate a personal access token.
  4. Note your Mailtrain root URL.
  5. In AFI go to Settings > Mailtrain and paste the token and root URL.

How to create the integration

  1. In WordPress admin, go to AFI > New Integration.
  2. Pick your Sender (Contact Form 7, WPForms, WooCommerce, etc.) and the form / event to listen on.
  3. Pick Mailtrain as the Receiver, then pick the Task you want to run.
  4. Map sender fields onto Mailtrain’s fields. Email is required. Custom fields must exist on the destination list.
  5. Optional: add Conditional Logic so the action only fires on matching submissions.
  6. Save and run a test submission. Check AFI > Log if anything looks off.

Notes & caveats

  • Self-hosted: confirm your Mailtrain instance is reachable from the internet (or from your WordPress server, at minimum).
  • CIDs (subscriber IDs) are returned on subscribe — store if you need to look up subscribers later.
  • List IDs: cached on save.

Related