Error sending e-mail from Sender Name <some@email.com> - Invalid address: (From):... (every sender email rejected by Drupal's core validation)

Created on 18 August 2022, over 2 years ago
Updated 8 September 2022, over 2 years ago

Problem/Motivation

Site is unable to send emails after upgrade to 1.1

Error logged:

Error sending e-mail from Some Name <noreply@aabbccc.com> to xxyyzz@somemail.com: Invalid address: (From): Some Name <noreply@aabbccc.com>

Steps to reproduce

core: 9.3.6

install 8.x-1.1. (or upgrade)
configure as normal
send a test smtp email

The error is thrown in messages and logged in watchdog

- This only started after recent change to ver 1.1.

- Fully operational when downgraded back to 1.0

used in conjunction with mimemal: drupal/mimemail: ^1.0@alpha

I have debugged this - tracing back to core - eguilas :isValid fails to validate the sender's address string formatted as:

Sender Name <some@email.com>

(This format is put together by smtp module from various elements; I have not checked what it is in 1.0, yet whatever 1.0 is doing - is not failing)

🐛 Bug report
Status

Closed: duplicate

Version

1.1

Component

Code

Created by

🇬🇧United Kingdom masterperoo

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