From dfe29b71478b39e1e66a3e51cc4c56258575cf80 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 11 Jan 2021 11:51:23 +0100 Subject: [PATCH] Disconnect SMTP session for all types of Exception during connect / auth --- .../lib/system/email/transport/SmtpEmailTransport.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php b/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php index 54e9d6202d..d68d456d58 100644 --- a/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php +++ b/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php @@ -388,7 +388,6 @@ class SmtpEmailTransport implements IEmailTransport { * @param Mailbox $envelopeTo * @throws \Exception * @throws PermanentFailure - * @throws SystemException */ public function deliver(Email $email, Mailbox $envelopeFrom, Mailbox $envelopeTo) { // delivery is locked @@ -407,7 +406,7 @@ class SmtpEmailTransport implements IEmailTransport { $this->disconnect(); throw $e; } - catch (SystemException $e) { + catch (\Exception $e) { $this->disconnect(); throw $e; } -- 2.20.1