Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 088b818

Browse files
committed
bug #38075 esmtp error not being thrown properly (Anton Zagorskii)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead. Discussion ---------- esmtp error not being thrown properly | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | n/a | License | MIT | Doc PR | n/a This is the same fix as #32895 but for esmtp transport Commits ------- 976eea3 esmtp error not being thrown properly
2 parents f0bf853 + 976eea3 commit 088b818

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransport.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ private function handleAuth(array $modes): void
166166

167167
return;
168168
} catch (TransportExceptionInterface $e) {
169-
$this->executeCommand("RSET\r\n", [250]);
169+
try {
170+
$this->executeCommand("RSET\r\n", [250]);
171+
} catch (TransportExceptionInterface $_) {
172+
// ignore this exception as it probably means that the server error was final
173+
}
170174

171175
// keep the error message, but tries the other authenticators
172176
$errors[$authenticator->getAuthKeyword()] = $e;

0 commit comments

Comments
 (0)