[Mailer] fixed error that is masked by another error

This commit is contained in:
Fabien Potencier 2019-08-03 10:22:01 +02:00
parent 8f1d9d2c5d
commit 15dbe4b948

View File

@ -114,7 +114,11 @@ class SmtpTransport extends AbstractTransport
try {
$message = parent::send($message, $envelope);
} 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
}
throw $e;
}