Closed (fixed)
Project:
Mailer Plus (DSM+)
Version:
1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2023 at 15:06 UTC
Updated:
14 Feb 2023 at 01:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
adamps commentedComment #3
adamps commentedFix coding standards
Comment #4
adamps commentedAdd support for
$message['plain']Comment #6
adamps commentedComment #7
jungleGot 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.
Comment #8
jungleFound one occurrence of Reply-to in https://www.rfc-editor.org/rfc/rfc1036#section-3.6
Comment #9
adamps commentedMany 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.....
Comment #10
adamps commentedWhen 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).
Comment #12
adamps commentedComment #13
adamps commentedComment #15
adamps commentedHi @jungle it should be fixed now - please can you try again?
Comment #16
jungleTested manually with 1.x-dev which includes this commit. It works as expected.
@AdamPS Many thanks!
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?