8000 [Mailer] added debug info to TransportExceptionInterface by fabpot · Pull Request #32896 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Mailer] added debug info to TransportExceptionInterface #32896

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 1 commit into from
Aug 3, 2019

Conversation

fabpot
Copy link
Member
@fabpot fabpot commented Aug 3, 2019
Q A
Branch? 4.4
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
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.

@fabpot
Copy link
Member Author
fabpot commented Aug 3, 2019

While debugging, one can do something like this:

try {
    $sent = $transport->send($email);
} catch (TransportExceptionInterface $e) {
    print $e->getDebug()."\n";
    throw $e;
}
if ($sent) {
    print $sent->getDebug()."\n";
}

@fabpot fabpot merged commit 39ebb84 into symfony:4.4 Aug 3, 2019
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
@fabpot fabpot deleted the mail 8000 er-debug-info-for-exceptions branch August 3, 2019 15:48
fabpot added a commit that referenced this pull request Aug 3, 2019
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Add debug info on HTTP transport exceptions

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| 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

Same as #32896 but for HTTP transports.

Commits
-------

4cfb4b9 [Mailer] added debug info on HTTP transport exceptions
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
This was referenced Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0