- Issue created by @geek-merlin
- π¬π§United Kingdom adamps
Will you accept a patch?
Could do, but let's check out the other options first.
Also, the documented custom alters give no perfect safety, there can always be a re-alter.
When a hook throws SkipSending no one else can alter.
Another option: make only one transport on the test site = null transport
Also see β¨ Support for Reroute Email Closed: won't fix
- π©πͺGermany geek-merlin Freiburg, Germany
Yes, let's see see problem space and options.
RerouteEmail: I know this and it's the other approach.
Also there is MailSafety, and π No mail with symfony_mailer Needs work> When a hook throws SkipSending no one else can alter.
Thx, i did not see that.> Another option: make only one transport on the test site = null transport
Can this give us a single config override that gives us safety that no mail is sent?
A config override that is the same for all dev environments, and simply auditable (i look into the settings and know that no customer ouch will happen)?
(That's the driver here!) - π¬π§United Kingdom adamps
Given that virtually every site owner needs this,
Only you and I are following the issueπ.
What the other modules give is flexibility to check the emails that are being sent e.g. by forwarding to another address. The patch here discards all emails, which is not necessarily very helpful for being able to test. The other modules already have a community and provide a useful solution. Enhancing them to work with this module seems like the right solution, and it shouldn't be difficult. What is the disadvantage of that???
The patch on π No mail with symfony_mailer Needs work seems like the wrong approach - as you say it requires adding an adjuster. Presumably the module previously used
hook_mail_alter()
and it should now use the new hooks and throw a SkipSending.A config override that is the same for all dev environments, and simply auditable
Probably not really.
- π©πͺGermany geek-merlin Freiburg, Germany
> What the other modules give is flexibility to check the emails that are being sent e.g. by forwarding to another address.
> Enhancing [the other modules] to work with this module seems like the right solution, and it shouldn't be difficult. What is the disadvantage of that???Yes i can follow that reasoning and work in that direction. Then we can close this. Or better postpone and crosslink the related, so that others will not open new issues, but collaborate over there. Your choice. (Added googlefood).
- π¬π§United Kingdom adamps
I think this is a duplicate of β¨ Support for Reroute Email Closed: won't fix so we should close one of them, and copy across any important information into the other. The other issue came first and has more followers, so it seems natural to make this one the duplicate.
- π³π΄Norway eiriksm Norway
Also interested.
My use case is different though. I need the regular nail manager to be in use in CI, since my tests are setting the mail interface class. Since symfony mailer is replacing the plugin manager, I would like the kill switch to just not replace anything in the service provider
- last update
over 1 year ago 6 pass - @eiriksm opened merge request.
- π³π΄Norway eiriksm Norway
Opened a MR with a completely backwards compatible solution that totally disabled symfony mailer with a service container parameter.
To use, add something like this to your services.yml (or you can even have it in a module service.yml I guess)
parameters: symfony_mailer.disabled: true
- πΊπ¦Ukraine bohart Lutsk, Ukraine
Reroute email module now supports Drupal Symfony Mailer module: https://www.drupal.org/project/reroute_email β (2.3.x versions)
Once the issue β¨ Allow removal of to/cc/bcc/reply-to addresses (after they are added to an email) Needs work is a part of the next Drupal Symfony Mailer release, Reroute email module will have a new stable release with full support.
So, the site owners can enable and configure it for not sending (or rerouting) any emails from all instances (except the live instance, for example).
Hope this update/comment helps!
- Status changed to Closed: won't fix
over 1 year ago 12:38pm 14 October 2023 - π¬π§United Kingdom adamps
Great thanks @bohart I'll get onto the other issue
Not sure whether to mark this as fixed, but "won't fix" is probably more accurate.
I added a ref to Reroute Email in the FAQ https://www.drupal.org/docs/contributed-modules/drupal-symfony-mailer/fa... β
- πΊπΈUnited States NicholasS
Wanting to switch to symphony mailer, but also need the same features discussed here that mail_safety provided.
- Ability to disable all outgoing mail, the web UI checkbox is great for debugging smtp issues on dev
- The dashboard or outgoing mail log of mail_safety is also a hard requirement.
- mail safety also allows overriding and resending using the dashboard/log also handy.
For me the reroute email isn't ideal as I don't think ill be able to verify the To: is accurate in my dashboard/logs.
+1 to NicholasS - I'd rather use symfony_mailer, but this issue might mean we have to use https://www.drupal.org/project/symfony_mailer_lite β and keep using mailsystem etc.