Skip to content

Commit

Permalink
[Mailer] fixed SMTP support when a message cannot be sent
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Mar 30, 2019
1 parent f3f1ebc commit 3d25c1c
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -111,7 +111,13 @@ public function send(RawMessage $message, SmtpEnvelope $envelope = null): ?SentM
$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();

Expand Down

0 comments on commit 3d25c1c

Please sign in to comment.