From 976eea3be089cefe6224959d36fd1ae31b2ce808 Mon Sep 17 00:00:00 2001 From: Anton Zagorskii Date: Sun, 6 Sep 2020 12:04:32 +0100 Subject: [PATCH] esmtp error not being thrown properly --- .../Component/Mailer/Transport/Smtp/EsmtpTransport.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransport.php b/src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransport.php index afa522ae97..adfcb55eaa 100644 --- a/src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransport.php +++ b/src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransport.php @@ -166,7 +166,11 @@ class EsmtpTransport extends SmtpTransport return; } catch (TransportExceptionInterface $e) { - $this->executeCommand("RSET\r\n", [250]); + try { + $this->executeCommand("RSET\r\n", [250]); + } catch (TransportExceptionInterface $_) { + // ignore this exception as it probably means that the server error was final + } // keep the error message, but tries the other authenticators $errors[$authenticator->getAuthKeyword()] = $e;