A new mail-system based on the popular Symfony Mailer library giving full support of HTML mails, file attachments, embedded images, 3rd-party delivery integrations, load-balancing/failover, signing/encryption, async sending and more. Other libraries add capability for CSS inlining and HTML to text conversion.

Goals:

  1. Drop-in replacement with minimal migration steps for the popular swiftmailer module, which became unsupported end Nov 2021.
  2. Provide improved API and configuration model for sites that are willing to adapt. This module provides a deep integration into Drupal mechanisms, including theme/template/render, multi-language, CSS libraries, configuration, plug-ins, hooks, and logging.
  3. Allow sites to evolve smoothly from the first to the second.

This module was formally named Symfony Mailer, but has been renamed Drupal Symfony Mailer to avoid confusion with the underlying Symfony Mailer library.

V1.3.* of this module is not compatible with Drupal 10.1 due to #3371042: Drupal 10.1.0 new aggregation breaks InlineCssEmailAdjuster. Please upgrade to v1.4.

Important information

Please read these pages before using this project as they explain how to get the module working, and what you can expect to work.

Status and how to help

This module now has a stable release with security coverage.

Support welcome by contributing patches for issues. Help expand the set of integrated modules by writing EmailBuilder plug-ins. The code is normally quite simple, and there is a documentation guide.

Compatibility

This module is not just another mail plug-in – rather it's a full mail system that replaces the one in Drupal Core. We made this choice because the existing MailManager was designed for sending plain text mails using PHP mail and is not well-suited for extension to the many features desired to send modern emails.

The new mail-system offers a new mail interface, which eventually we anticipate that an increasing number of modules will adopt. In the meantime, it also implements the existing interface. This gives a three-level path for support of a sender module that send emails (please follow the links for more details).

  • Level 1 – Compoatibility mode. Automatic conversion of emails using the old interface (hook_mail() and hook_mail_alter()). It's possible to use many of the new features, although with some limitations.
  • Level 2 – Override mode. A new EmailBuilder plug-in is used instead of calling the old hook_mail() interface. This gives almost all of the benefits of this Symfony Mailer – still without changing any sender code. This module includes plug-ins for Drupal core, and an increasing library of other contrib modules.
  • Level 3 Native implementation. Sender modules can choose to write directly to the new mail-system API, allowing simplified code combined with more flexible and powerful features.

Related modules

Similar projects

Drupal Symfony Mailer Lite sends emails using the same approach as the Swiftmailer module. It’s designed to be a direct drop-in replacement for Swiftmailer, maintaining as closely as possible the same features, behaviour and conventions.

Project information

Releases