Cannot send when 'To' field is blank

Created on 27 March 2025, 10 days ago

Problem/Motivation

We are using the Drupal Symfony Mailer in combination with Workflow Notifications (and the reroute_email_symfony_mailer IS enabled). Our workflow notification emails appear to use the 'BCC' field instead of the 'To' field, which generates an error from reroute_email complaining that
"TypeError: Drupal\reroute_email\Plugin\RerouteEmailHandler\HookMailAlter::setHeader(): Argument #2 ($value) must be of type string, null given"

Steps to reproduce

Install and enable modules listed above. Create a workflow that sends notification to author and additional role when a node's state is changed. (sorry, lots of setup!) Trigger notification by changing the status of a node to trigger the workflow.

Proposed resolution

Modify RerouteEmailHandlerPluginBase.php to handle the case of a blank 'To' field similar to the Cc and Bcc fields

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.3

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States srees

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024