mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-27 00:25:50 +03:00
[GH-ISSUE #1621] Implement a symfony/mailer handler #689
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#689
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MaximilianKresse on GitHub (Dec 14, 2021).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1621
As swiftmailer is abandoned many of us are "forced" to search for an alternative. The recommended alternative is symfony/mailer.
I'm not using the Symfony Framework but only the
symfony/mailer. I know there is an implementation inside the monolog-bridge. But themonolog-bridgehas some dependencies which I absolutely not need e.g.symfony/http-kernel. So i don't want to require themonolog-bridgeas I'm only missing the monolog handler.Is there a chance we could get an implementation directly inside the monolog package like with the swiftmailer handler?
@stof commented on GitHub (Dec 14, 2021):
AFAIK the monolog package itself has stopped accepting handlers that rely on additional dependencies, as it makes it very hard to manage dependencies (the monolog package cannot require those dependencies, as it would annoy all projects not using that handler). That's also why the wiki has a list of third-party packages related to monolog.
@MaximilianKresse commented on GitHub (Dec 14, 2021):
Ok thank you for your answer. That makes sense! I'll take a look at an alternative approach.
@Seldaek commented on GitHub (Mar 6, 2022):
Yeah for this I think I may want to make an exception though as email support is kinda core IMO and just relying on mail() makes for a poor UX.
SwiftMailerHandler needs to be deprecated, and MandrillHandler also relies on SwiftMailer being present to build a message so this would need to be updated too.
@Seldaek commented on GitHub (Mar 6, 2022):
If someone wants to help with this that'd be great btw.
@driesvints commented on GitHub (Mar 14, 2022):
I'll answer @dmitry-ivanov's question here. It's true that we don't use Symfony's Mailer directly, just the transports. It's because we already have our own Mailer class with its
sendmethod. Changing it would be a really big breaking change to our users.I'm not too familiar with Monolog's handlers or inner workings so I'm not sure I can answer what's needed to make this work on the Laravel side of things.
@raziel057 commented on GitHub (Mar 16, 2022):
Please note that with the current implementation of monolog-bridge there is an issue when using SmtpTransport related to the fact that Symfony Mailer use monolog to log in the
stopmethod https://github.com/symfony/symfony/blob/6.1/src/Symfony/Component/Mailer/Transport/Smtp/SmtpTransport.phphttps://github.com/symfony/monolog-bundle/issues/405
@Seldaek commented on GitHub (May 3, 2022):
See https://github.com/Seldaek/monolog/pull/1663