This project is not covered by Drupal’s security advisory policy.

Pluggable Mailers makes it easier for developers to write new email services for Drupal, by providing an object-oriented wrapper around Drupal's hook_mail() implementation. A default mailer is included.

Pluggable mailers can also be used as a wrapper around the default Drupal mail functionality, allowing you to send an email with just one function (no hook_mail()) required.

Adding your own email plugins

Making a new pluggable mailer is easy, just create a new Ctools plugin of type "pluggable_mailer", and implement the PluggableMailInterface. There is an assumption that you will extend the base PluggableMailPlugin class as well, to get access to readily defined methods for common tasks, though this is not necessary if you are able to implement all the methods yourself, such that they return acceptable values.


Defines base functionality for a mail class, including setting of parameters, choice of mail system, and preparing template variables.

Defines some default implementations of the PluggableMailInterface.

pluggable_mailers_send_email($email_address, $params = array(), $plugin_name = 'default', $from_address = NULL, $language = NULL)
Send an email to an email address.

This module was developed with the support of PreviousNext.

Project information