Mailcoach integrates Drupal with Mailcoach Cloud by providing a configurable newsletter subscription form. It lets you collect email addresses in Drupal and subscribe them directly to a Mailcoach Cloud list via the API - without using embedded third-party forms.

Features

  • Adds a configuration form to store your Mailcoach Cloud API base URL, list UUID, API token, and request timeout.
  • Provides a simple newsletter subscription form (email address only).
  • Sends subscriptions directly to the configured Mailcoach list using the Mailcoach Cloud API.
  • Displays a success message to the visitor and logs API errors while showing a generic error message to end users.

Typical use cases include subscription forms in landing pages, footers, and design system components where you prefer a Drupal-native form over JavaScript embeds.

Post-Installation

  1. Enable the module (via the Extend page or Drush).
  2. Configure Mailcoach at the module settings page:
    • /admin/config/services/mailcoach (location may vary by site)
  3. Enter:
    • API base URL (e.g. https://mailcoach.app or your Mailcoach Cloud domain)
    • List UUID (the Mailcoach list to subscribe users to)
    • API token (with permission to manage subscribers)
    • Request timeout (seconds)
  4. Use the subscription form:
    • Visit /newsletter/subscribe, or
    • Embed the form in your theme/templates (for example with Twig Tweak):
      {{ drupal_form('Drupal\\mailcoach\\Form\\SubscribeForm') }}

Additional Requirements

  • A Mailcoach Cloud account
  • A Mailcoach Cloud API token
  • A Mailcoach Cloud email list UUID
  • Twig Tweak (optional) - useful when embedding the form directly
    from Twig templates/components.

Similar projects

Many newsletter modules focus on other providers or rely on embedded external forms. Mailcoach focuses on a minimal,
Drupal-native form that communicates directly with Mailcoach Cloud via the API and is easy to integrate into custom
themes and component-based sites.

Supporting this Module

Please use the Drupal.org issue queue for bug reports and feature requests. Patches and merge requests are welcome.

Community Documentation


Security note: Treat API tokens as secrets. Avoid committing real tokens to version control and prefer secure configuration management practices appropriate for your hosting/deployment setup.

AI disclaimer: This module was initially created with the help of AI, manually reviewed and tested by me (Tim Lammar)

Supporting organizations: 
Initial development

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Project categories: Integrations, User engagement
  • Created by tim@lammar.be on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    Look for the shield icon below.

Releases