Introducing the Mailgun module for Drupal

Looking for a Mailgun module to fit Drupal? Jeffrey Chen goes into the details of his Mailgun module and documentation. Read more...



This post was contributed by Jeffrey Chen at Peano Inc.

One thing Mailgun and Drupal have in common is that they’re both developer-centric services, making it extremely easy to extend and build on top of their structure and APIs.

I discovered Mailgun when I was working with a client that needed an email service with a flexible pricing structure to support their fluctuant email sending volume that varied greatly from month to month. Mailgun was the perfect fit for their requirements. We use Drupal for all of our sites and since there wasn’t an existing integration built for Drupal, we went ahead and built the module.

We built a basic integration with the following key features:

  • Queue support: Queuing enables messages to be sent on cron runs, which comes in handy for sending a large amount of messages.

  • Support for all Mailgun message parameters: You can easily specify BCCs, add tags, disable tracking for just one message, or add your own header by simply passing over the parameters and the module will handle them nicely.

  • Smart domain recognition mechanism: Mailgun APIs require you to specify the “working domain” on which the operation takes place and this module automatically recognizes the domain you’re working on. For example, when you’re sending a message, the module decomposes the domain in the From address and intelligently matches it to a domain you have in your profile, even if it’s a subdomain.

  • Built-in HTML support: The Mailgun module utilizes Mailgun’s server-level support for handling HTML messages. This means MIME is no longer your hassle.

  • Fully extensible: Simply call the mailgungetclient() function and use the client object to perform any operation you want.

The module is available here and you can access the documentation here. Feel free to contribute to the module by helping out in the issue queue. You can also give small donations to help support the development and maintenance of the module.

We hope you find this integration useful and welcome your comments and suggestions.

Related readings

Privacy, automatic engagements, and Mailgun’s bot detection

Now more than ever, users are concerned about their data privacy and what steps they can take to protect their personal information. And that’s something big players in the tech...

Read more

Here’s how to track email opens in Gmail with email tracking

Sending email campaigns doesn’t have to feel like you’re throwing darts into a black hole. Email analytics are a great way to determine the health of your ecommerce campaign and...

Read more

Everything you need to know about sending email with APIs

Are you creating an e-commerce web page that needs to send transactional emails to customers? A developer building a web application that needs to send messages to email...

Read more

Popular posts

Mailgun iconSee what you can accomplish with the world's best email delivery platform. It's easy to get started.Let's get sending
CTA icon Mailgun Icon