- Status changed to Needs review
almost 2 years ago 5:02pm 17 January 2023 -
AdamPS →
committed d9dfaf57 on 1.x
Issue #3334230 by AdamPS: Support all headers in LegacyEmailBuilder
-
AdamPS →
committed d9dfaf57 on 1.x
- Status changed to Fixed
almost 2 years ago 5:41pm 27 January 2023 - Status changed to Needs review
almost 2 years ago 12:55pm 28 January 2023 - 🇨🇳China jungle Chongqing, China
TypeError: Symfony\Component\Mime\Header\Headers::addMailboxListHeader(): Argument #2 ($addresses) must be of type array, string given, called in /var/www/html/vendor/symfony/mime/Header/Headers.php on line 154 in Symfony\Component\Mime\Header\Headers->addMailboxListHeader() (line 82 of /var/www/html/vendor/symfony/mime/Header/Headers.php)
#0 /var/www/html/vendor/symfony/mime/Header/Headers.php(154): Symfony\Component\Mime\Header\Headers->addMailboxListHeader('Reply-to', 'Example #1 /var/www/html/web/modules/contrib/symfony_mailer/src/LegacyMailerHelper.php(126): Symfony\Component\Mime\Header\Headers->addHeader('Reply-to', 'ExampleGot an error with the change here.
The root cause is probably that In the webform module, it's Reply-to, here it's Reply-To. See https://git.drupalcode.org/project/webform/-/blob/6.1.x/webform.module#L462
Not sure if this should be reported to webform.
- 🇨🇳China jungle Chongqing, China
Found one occurrence of Reply-to in https://www.rfc-editor.org/rfc/rfc1036#section-3.6
- Status changed to Needs work
almost 2 years ago 3:11pm 28 January 2023 - 🇬🇧United Kingdom adamps
Many thanks for spotting that.
The Symfony Mailer library accepts 'Reply-to', and expects an array (because the header allows multiple values).
Drupal Symfony Mailer looks for 'Reply-To', it doesn't match so puts a single element.
This question/answer indicates that headers are not case-sensitive.
I'll fix it.....
- Status changed to Needs review
almost 2 years ago 6:18pm 28 January 2023 - 🇬🇧United Kingdom adamps
When I look closely, Drupal does complex and strange things. The header is called 'Reply-to' in core. The 'To' field is taken from $message['to'] rather than from $message['headers']['to']. The 'From' and 'Reply-To' are stored in 2 places. Latest patch tries to copy what Core does (only applies to LegacyEmailBuilder).
The last submitted patch, 10: symfony_mailer.legacy-headers.3334230-10.patch, failed testing. View results →
-
AdamPS →
committed 60fdaa71 on 1.x
Issue #3334230 by AdamPS, jungle: Support all headers in...
-
AdamPS →
committed 60fdaa71 on 1.x
- Status changed to Fixed
almost 2 years ago 4:11pm 30 January 2023 - 🇬🇧United Kingdom adamps
Hi @jungle it should be fixed now - please can you try again?
- 🇨🇳China jungle Chongqing, China
Tested manually with 1.x-dev which includes this commit. It works as expected.
@AdamPS Many thanks!
+++ b/src/LegacyMailerHelper.php @@ -83,15 +86,22 @@ class LegacyMailerHelper implements LegacyMailerHelperInterface { + // Drupal doesn't store the 'To' header in $message['headers'].
I think it's better to open a follow-up to write a test. What if, in the future, Drupal stores 'To' in $message['headers']? What's your opinion?
Automatically closed - issue fixed for 2 weeks with no activity.