Disconnect SMTP session for all types of Exception during connect / auth
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 11 Jan 2021 10:51:23 +0000 (11:51 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 11 Jan 2021 11:18:48 +0000 (12:18 +0100)
wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php

index 54e9d6202d26e61c519ecf4173db8edd4cc9f450..d68d456d589395f8c5aa5d3d9250726c331cea4d 100644 (file)
@@ -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;
                        }