Symfony Mailer in Core: The Road Ahead

Speaker(s)
znerol
Session track
Code & Development
Experience level
Intermediate
Duration
50 min

Abstract

Drupal Core currently provides a very rudimentary API for sending transactional emails. This applies to both, the way emails are constructed (markup rendered to plaintext) as well as the way they are delivered (using the very limited built-in PHP mail function). A growing number of contrib projects are attempting to close this gap. However, to give site builders the tools they need to make their emails look good and work with modern email infrastructure, contrib projects must apply crude hacks to work around the limitations of the core mail API.

Since Drupal 10.2, the symfony/mailer component is part of Drupal core. An experimental and very simple mail plugin based on Symfony mailer has been added as well. This can be used now to send simple messages via SMTP without installing a contrib module.

However, the integration is far from complete. Symfony mailer provides many more features and extension points.

This session gives an overview of the emerging Drupal mail API followed by a (hopefully) long Q&A where the audience is encouraged to bring in their PoV regarding the future of transactional email. The results of this session will ideally lead to a clear and broadly accepted plan for the next step on how Drupal core transactional email is going to be modernized in upcoming releases.