How to Set Up Mailgun with Drupal for Transactional Emails: A Step-by-Step Guide
In this post, John Picozzi details his transition from SendGrid to Mailgun for handling transactional email in Drupal. With SendGrid discontinuing its free tier, John's site silently stopped sending emails, prompting a switch. He selected Mailgun for its free plan and its official Drupal module, making it a lightweight, integrated solution for low-volume messaging needs.
The guide outlines each step clearly: domain verification via DNS, installing and enabling the Drupal Mailgun module, and securely managing the API key. A critical point is setting Mailgun as the default mail system, which is not done automatically. John flags an open issue in the module regarding secure key storage—an area where community contributions are welcome.
After confirming functionality with a test email, John committed the configuration and deployed changes to production. The post is straightforward and practical, especially useful for developers needing a basic transactional email setup without overengineering. It also emphasises best practices in config management and module cleanup.


