Add support for Drupal Symfony Mailer

Created on 3 November 2022, about 2 years ago
Updated 23 January 2023, almost 2 years ago

Problem/Motivation

With the Swift Mailer module now obsolete, I recently tested the Drupal Symfony Mailer module, the recommended replacement ( https://www.drupal.org/project/symfony_mailer ).

This appeared to work well, but I did encounter an issue with the emails that were being sent out by ECA.

specifically, there were some instances where HTML was not being correctly escaped in the email.

In my testing, the [node:body] and [comment:body] were examples.

In the case of [comment:body], the email would contain something in the form of:

<p>&lt;p&gt;Comment body.&lt;/p&gt;</p>

Other tokens, those which didn't generate results containing HTML, appeared to behave as expected when used in emails triggered by ECA and processed by Symfony Mailer.

It's likely that it's possible to address this without going as far as adding native support for ECA to the Drupal Symfony Mailer module. But, as a non-developer, I've looked and not been able to determine how to do so.

There are a couple of existing threads discussing support/issues with similar modules:

Rules: https://www.drupal.org/project/symfony_mailer/issues/3265749
Business Rules: https://www.drupal.org/project/symfony_mailer/issues/3272131

With Drupal Symfony Mailer likely to become the primary mail handler for Drupal moving forward, it would be great to ensure that it and ECA play nicely together.

Steps to reproduce

1. Install and enable the Drupal Symfony Mailer module.
2. Create and enable an ECA model that uses the [node:body] token in an email that is sent when new content is created.
3. Create new content so as to trigger the above model.
4. Inspect the email.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Fixed

Version

1.1

Component

Code

Created by

🇬🇧United Kingdom Janner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024