Пример #1
0
 /**
  * Class destructor to ensure all open connections are closed
  *
  * @return void
  */
 public function __destruct()
 {
     if ($this->connection instanceof SmtpProtocol) {
         try {
             $this->connection->quit();
         } catch (Protocol\Exception $e) {
             // ignore
         }
         $this->connection->disconnect();
     }
 }
Пример #2
0
 /**
  * Class destructor to ensure all open connections are closed
  */
 public function __destruct()
 {
     if ($this->connection instanceof Protocol\Smtp) {
         try {
             $this->connection->quit();
         } catch (ProtocolException\ExceptionInterface $e) {
             // ignore
         }
         if ($this->autoDisconnect) {
             $this->connection->disconnect();
         }
     }
 }
Пример #3
0
 public function quit()
 {
     $this->calledQuit = true;
     parent::quit();
 }