-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mailer] Logger vs debug mailer #32583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15c20c6
to
b22dd6d
Compare
b22dd6d
to
7acebce
Compare
Failures on high deps will be resolved when merging up. |
src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php
Outdated
Show resolved
Hide resolved
7acebce
to
fded3cd
Compare
nicolas-grekas
approved these changes
Jul 18, 2019
fabpot
added a commit
that referenced
this pull request
Jul 18, 2019
This PR was squashed before being merged into the 4.4 branch (closes #32583). Discussion ---------- [Mailer] Logger vs debug mailer | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a | License | MIT | Doc PR | n/a Currently, there is no way to get the network data for the HTTP calls done by the HTTP transports (which makes debugging harder). For SMTP, we do have the network data, but as logs (each SMTP command/response is its own log line which means that the logs are "polluted" and the data is not tied with the sent message). This pull request adds a `getDebug()` method on `SentMessage`. That allows to get the debug data conveniently in a standardized way (for both SMTP and HTTP transports). I have moved the SMTP logs to this new mechanism and added support for HTTP transports. Commits ------- fded3cd [Mailer] added support ffor debug info when using SMTP d2f33d2 [Mailer] added debug info for HTTP mailers
fabpot
added a commit
that referenced
this pull request
Aug 3, 2019
…ce (fabpot) This PR was merged into the 4.4 branch. Discussion ---------- [Mailer] added debug info to TransportExceptionInterface | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a | License | MIT | Doc PR | ~ In 4.4, you can get the debug information for the SMTP/HTTP data via `$message->getDebug()` (see #32583). But the data are probably even more important when there is an exception. That's what I implemented in this PR. Commits ------- 39ebb84 [Mailer] added debug info to TransportExceptionInterface
This was referenced Nov 12, 2019
Merged
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, there is no way to get the network data for the HTTP calls done by the HTTP transports (which makes debugging harder). For SMTP, we do have the network data, but as logs (each SMTP command/response is its own log line which means that the logs are "polluted" and the data is not tied with the sent message).
This pull request adds a
getDebug()
method onSentMessage
. That allows to get the debug data conveniently in a standardized way (for both SMTP and HTTP transports). I have moved the SMTP logs to this new mechanism and added support for HTTP transports.