- Issue created by @HitchShock
- Assigned to quadrexdev
- Merge request !74#3400552 Fixed an error when re-routing to multiple recipients in cc/bcc/to β (Merged) created by quadrexdev
- πΊπ¦Ukraine quadrexdev Lutsk
Should be fixed by using reroute_email_extract_addresses() when setting cc/bcc/to recipients. Please review.
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 2:12pm 1 December 2023 - Status changed to Needs work
about 1 year ago 2:25pm 1 December 2023 - πΊπ¦Ukraine bohart Lutsk, Ukraine
Hi @quadrexdev,
thanks for your contribution!1) reroute_email_extract_addresses function is located in the module files as a legacy artifact.
Let's move it as a method to RerouteEmailHandlerPluginBase (this is the only place where it is used).2) We should cover this bug with a test. There is MultipleRecipientsTest for hook_mail_alter implementation.
This test should be added to reroute_email_symfony_mailer tests.Thanks!
- Status changed to Needs review
about 1 year ago 8:20am 7 December 2023 - πΊπ¦Ukraine quadrexdev Lutsk
Thanks for your help @bohart!
I guess now it's ready for the review.
A summary of what was done:
1. The reroute_email_extract_addresses function is moved as the extractEmailAddresses method in the new trait - RerouteEmailHelpers.
2. All to/cc/bcc-related functions use the extractEmailAddresses method to process addresses.
3. New test - SymfonyMailerMultipleRecipientsTest.
4. Associative array keys are used for datasets in SymfonyMailerTestEmailFormTest (so it's easier to find problematic places in case the test fails).
5. New test - InvalidAddressesTest.
6. Updated tests that were failing because of spaces between e-mail addresses in the string. F.e - link.
7. Added clearing of mail collector state due to the following error:1) Drupal\Tests\reroute_email_symfony_mailer\Functional\SymfonyMailerMultipleRecipientsTest::testMultipleRecipients All emails have been checked. Failed asserting that actual size 1 matches expected size 0.
Explained here - link.
I do believe it should be moved to the issues queue of Symfony mailer to add support for multiple e-mails in the collector state.
-
bohart β
committed e163e742 on 2.3.x authored by
quadrexdev β
Issue #3400552 by bohart, quadrexdev: Fixed incorrect converting email...
-
bohart β
committed e163e742 on 2.3.x authored by
quadrexdev β
- Status changed to Fixed
about 1 year ago 11:53am 7 December 2023 - πΊπ¦Ukraine bohart Lutsk, Ukraine
@quadrexdev, thanks for your contribution!
Committed to 2.3.x dev branch. It will be a part of the next 2.3 series releases.We will also need to handle a new test InvalidAddressesTest for Symfony Mailer submodule,
but it will be a part of π SymfonyMailerTestEmailFormTest skipped 6 tests to run Active .Thanks!
Automatically closed - issue fixed for 2 weeks with no activity.