- Issue created by @adamps
- ๐ฎ๐ณIndia Shreya_98
Shreya_th โ made their first commit to this issueโs fork.
- Merge request !61Wrong case for headers after using MailManagerInterface::mail() issue fixed โ (Open) created by Unnamed author
- last update
over 1 year ago 3 pass, 4 fail - Status changed to Needs review
over 1 year ago 8:32am 25 September 2023 - ๐ฎ๐ณIndia Shreya_98
Hi @AdamPS,
I have solved this issue and made changes in LegacyMailerHelper.php file and also created MR for this issue i.e. "Wrong case for headers after using MailManagerInterface::mail()" . Kindly review the changes .Thank you .
- last update
over 1 year ago 3 pass, 4 fail - last update
over 1 year ago 8 fail - Status changed to Needs work
over 1 year ago 11:10am 26 September 2023 - First commit to issue fork.
- Merge request !87Issue #3388584: Wrong case for reply-to header after using MailManagerInterface::mail() โ (Open) created by mingsong
- ๐ฆ๐บAustralia mingsong ๐ฆ๐บ
Why don't we just change the line 96 from
$message['headers'][$name] = $header->getBodyAsString();
to
$message['headers'][$lc_name] = $header->getBodyAsString();
The idea is to use the lower case name instead of the original name.
Create a new MR for the new approach.
https://git.drupalcode.org/project/symfony_mailer/-/merge_requests/87
- Status changed to Needs review
about 1 year ago 12:40am 14 February 2024 - ๐ฌ๐งUnited Kingdom adamps
AdamPS โ changed the visibility of the branch 3388584-header-wrong-case to hidden.
- Status changed to Needs work
about 1 year ago 10:16am 14 February 2024 - ๐ฌ๐งUnited Kingdom adamps
@Mingsong Because we need to match the code in MailManager.php which starts with a capital letter.
- ๐ฆ๐บAustralia mingsong ๐ฆ๐บ
@Adam, so does it mean we need to keep $message['headers']['Reply-To'] and meanwhile also need another header $message['headers']['reply-to']?
- ๐ฌ๐งUnited Kingdom adamps
I suggest that we should try to match MailManager exactly, so there would be only $message['headers']['Reply-to']. Note that the 't' is in lower case. So something like
$legacy_name = ($name == 'Reply-To') ? 'Reply-to' : $name; $message['headers'][$legacy_name] = $header->getBodyAsString();
- ๐ฌ๐งUnited Kingdom adamps
The suggested code in in #14. It goes in
LegacyMailerHelper::emailToArray()
. - ๐ฎ๐ณIndia koustav_mondal Kolkata
@adamps I have made the cahnges. Please review.
- ๐ฌ๐งUnited Kingdom adamps
Thanks, it looks good to me.
We need someone to test that it works? Either run the code in a debugger, or add a debug print message, then check that the headers are as expected. If you can do that great, else we can wait for one of the other followers.
- ๐ฎ๐ณIndia ankitv18
Please rebase the MR so that CI jobs at least executed properly.
With referring #21 by @adamps if there's already a test then that need to be updated. - First commit to issue fork.
- ๐ฎ๐ณIndia adwivedi008
Hello ankitv18
As per suggestions, I have rebased the branch with 2.x
Please review and suggest any other changes required