Example #1
0
File: Smtp.php Project: stunti/zf2
 /**
  * Class destructor to ensure all open connections are closed
  *
  * @return void
  */
 public function __destruct()
 {
     if ($this->_connection instanceof SmtpProtocol\Smtp) {
         try {
             $this->_connection->quit();
         } catch (Protocol\Exception $e) {
             // ignore
         }
         $this->_connection->disconnect();
     }
 }