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