When sending emails to multiple recipients, a space is appended to the latter recipients

Created on 5 March 2020, about 5 years ago
Updated 2 May 2024, 10 months ago

Problem/Motivation

When sending emails for multiple recipients, a space is appended in front of the the email address. This causes some emails to be bounced or blocked.

Proposed resolution

Remove the space that is appended to email addresses in the list.

This is found on line 100 of MailHandler.php. (I was going to provide a patch, but being it would be my first and I'm new to the process, I thought I would see if this was an actual bug before moving forward.)

🐛 Bug report
Status

Closed: works as designed

Version

11.0 🔥

Component
Contact 

Last updated 18 days ago

Created by

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.

  • 🇦🇺Australia mstrelan

    From what I gather we're sending emails that are address to multiple recipients like so:

    foo@example.com, bar@example.com

    In fact if you put a debugger in \Drupal\Tests\contact\Unit\MailHandlerTest::testSendMailMessages we are asserting that the to address is admin@drupal.org, user@drupal.org.

    My understanding is that this is perfectly fine. I'm inclined to mark this "works as designed" but wondering if there are specific examples where the space after the comma is invalid. For that reason I'm setting this to PMNMI.

  • Status changed to Closed: works as designed 10 months ago
  • 🇦🇺Australia pameeela

    No reply after >1 year so I will close this. If anyone believes this is a problem, please create a new issue with specific steps to reproduce.

Production build 0.71.5 2024