mailcoach
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
- Enable the module (via the Extend page or Drush).
-
Configure Mailcoach at the module settings page:
/admin/config/services/mailcoach(location may vary by site)
-
Enter:
- API base URL (e.g.
https://mailcoach.appor your Mailcoach Cloud domain) - List UUID (the Mailcoach list to subscribe users to)
- API token (with permission to manage subscribers)
- Request timeout (seconds)
- API base URL (e.g.
-
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') }}
- Visit
Additional Requirements
- A Mailcoach Cloud account
- A Mailcoach Cloud API token
- A Mailcoach Cloud email list UUID
Recommended modules/libraries
-
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
- Mailcoach Cloud documentation: https://mailcoach.app
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.