/** * Class destructor to ensure all open connections are closed * * @return void */ public function __destruct() { if ($this->_connection instanceof Zend_Mail_Protocol_Smtp) { $this->_connection->quit(); $this->_connection->disconnect(); } }
/** * Class destructor to ensure all open connections are closed * * @return void */ public function __destruct() { if ($this->_connection instanceof Zend_Mail_Protocol_Smtp) { try { $this->_connection->quit(); } catch (Zend_Mail_Protocol_Exception $e) { // ignore } $this->_connection->disconnect(); } }