[Mailer] fixed SMTP support when a message cannot be sent

This commit is contained in:
Fabien Potencier 2019-03-30 14:46:29 +01:00
parent f3f1ebc520
commit 3d25c1c613

View File

@ -111,7 +111,13 @@ class SmtpTransport extends AbstractTransport
$this->start();
}
$message = parent::send($message, $envelope);
try {
$message = parent::send($message, $envelope);
} catch (TransportExceptionInterface $e) {
$this->executeCommand("RSET\r\n", [250]);
throw $e;
}
$this->checkRestartThreshold();