dev/core#1717 Fix SMTP failure on fail to disconnect due to new wrapper smtp mailer
authorSeamus Lee <seamuslee001@gmail.com>
Tue, 21 Apr 2020 21:11:29 +0000 (07:11 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Wed, 22 Apr 2020 00:01:47 +0000 (10:01 +1000)
Add in wrapper around to check if we can call it

CRM/Utils/Mail/FilteredPearMailer.php

index 1c11e23d16db3f4cce58bd5b4c297f347f8bd932..5ede19aa46ac3d8e6ad17e3499a22d2e15fd40b2 100644 (file)
@@ -109,4 +109,11 @@ class CRM_Utils_Mail_FilteredPearMailer extends Mail {
     unset($this->_delegate->{$name});
   }
 
+  public function disconnect() {
+    if (is_callable([$this->_delegate, 'disconnect'])) {
+      return $this->_delegate->disconnect();
+    }
+    return TRUE;
+  }
+
 }