- πͺπΈSpain manuga
The patch #15 is not working for me, commented in:
https://www.drupal.org/project/reroute_email/issues/3340298#comment-1493... π Not working for contact form and Symfony Mailer Fixed - π΅π±Poland relim
Changes done:
- Rerolled #15 patch to work with reroute_email 2.2.0
- Fixed attaching reroute information for symfony_mailer non-legacy emails
- πΊπΈUnited States charginghawk
It's somewhat alarming patch #15 would stop working if you updated, and then you'd start sending mails unexpectedly. That's for sure critical for symfony mailer users, and symfony mailer has a respectable 6500+ installs at this point, so marking critical.
- π§πͺBelgium mallezie Loenhout
Just nothing that this approach does not work for mails sent by other mail builders then the LegacyEmailBuilder.
That's the only plugin setting the needed parameter for reroute_email_mailer_build()
/** * Implements hook_mailer_build(). */ function reroute_email_mailer_build(EmailInterface $email) { // Prevent calling reroute for symfony legacy email builder. // For the mode an email reroute is handled by symfony_mailer itself by invoke 'mail' hook. // @see \Drupal\symfony_mailer\Plugin\EmailBuilde\LegacyEmailBuilderr::createParams() if (!empty($email->getParam('legacy_message'))) { return; }
If using the symfony_mailer_bc submodule and provided user mails (for example contact mails, this breaks).
Error: [] operator not supported for strings in user_mail() (line 795 of core/modules/user/user.module).
This because the body is predefined to a string in this patch, while it should be an array for the user_module. However this does then conflict again in reroute_email.
The website encountered an unexpected error. Please try again later. TypeError: nl2br(): Argument #1 ($string) must be of type string, array given in nl2br() (line 500 of modules/contrib/reroute_email/reroute_email.module). nl2br(Array) (Line: 500) reroute_email_mailer_post_render(Object)
No solution yet IMO, just posting here for people to get a heads up.
- πΊπΈUnited States shelane
I ended up going with a module that was written from the ground up specifically for Symfony mailer. https://www.drupal.org/project/symfony_mailer_reroute β
Itβs been working great.
- π©πͺGermany Anybody Porta Westfalica
Using reroute_email in combination with symfony_mailer and it simply works! What am I doing wrong? :D
- First commit to issue fork.
- @abyss opened merge request.
- πΊπ¦Ukraine abyss
Here we need to update the functionality to the 2.3.x branch.
- Status changed to Needs work
over 1 year ago 6:24pm 2 October 2023 - πΊπ¦Ukraine bohart Lutsk, Ukraine
Hi @Abyss,
a brand new 2.3.x branch has been created for the version of the module with RerouteEmailHandler plugins.Here is a meta issue for Drupal Symfony Mailer support:
[#3391109[Here is a todo list on this issue:
- we need to change MR destination branch to 2.3.x;
- actually, merge 2.3.x into your branch;
- a create a new RerouteEmailHandler plugin for Drupal Symfony Mailer support;
- remove all reroute logic from EmailAdjuster, it should only inject `plugin.manager.reroute_email_handler` and properly call `$reroute_handlers_manager->processAllByType("symfony_mailer_adjuster", $email);` -
bohart β
committed a3675959 on 2.3.x authored by
Abyss β
Issue #3261831 by Abyss, Aron Novak, relim, freelock, sdstyles,...
-
bohart β
committed a3675959 on 2.3.x authored by
Abyss β
- Status changed to Fixed
over 1 year ago 2:31pm 9 October 2023 - πΊπ¦Ukraine bohart Lutsk, Ukraine
All changes for initial support of Symfony Mailer:
- added EmailAdjuste/RerouteEmailAdjuster plugin;
- added RerouteEmailHandler/SymfonyMailerAdjuster plugin;
- refactored SettingsForm to be re-usable;
are committed to a brand new 2.3.x branch (which is supposed to be a branch for all releases with Drupal Symfony Mailer support).
No backport is expected here (for either 2.2.x or 2.1.x branches).All further work for Drupal Symfony Mailer support can be tracked here:
π [META] Drupal Symfony Mailer support ActiveThanks, @all!
Automatically closed - issue fixed for 2 weeks with no activity.