lib/classes/Swift/Transport/AbstractSmtpTransport.php
public function stop()
    {
        if ($this->started) {
            if ($evt = $this->eventDispatcher->createTransportChangeEvent($this)) {
                $this->eventDispatcher->dispatchEvent($evt, 'beforeTransportStopped');
                if ($evt->bubbleCancelled()) {
                    return;
                }
            }

            try {
                $this->executeCommand("QUIT\r\n", [221]);
            } catch (Swift_TransportException $e) {
            }

            try {
                $this->buffer->terminate();

                if ($evt) {
                    $this->eventDispatcher->dispatchEvent($evt, 'transportStopped');
                }
            } catch (Swift_TransportException $e) {
                $this->throwException($e);
            }
        }
        $this->started = false;
    }
public function stop()
    {
        if ($this->started) {
            if ($evt = $this->eventDispatcher->createTransportChangeEvent($this)) {
                $this->eventDispatcher->dispatchEvent($evt, 'beforeTransportStopped');
                if ($evt->bubbleCancelled()) {
                    return;
                }
            }

            try {
                $this->executeCommand("QUIT\r\n", [221]);
            } catch (Swift_TransportException $e) {
            }

            try {
                $this->buffer->terminate();

                if ($evt) {
                    $this->eventDispatcher->dispatchEvent($evt, 'transportStopped');
                }
            } catch (Swift_TransportException $e) {
                $this->throwException($e);
            }
        }
        $this->started = false;
    }
public function stop ( ) { if ( $ this -> started ) { if ( $ evt = $ this -> eventDispatcher -> createTransportChangeEvent ( $ this ) ) { $ this -> eventDispatcher -> dispatchEvent ( $ evt , 'beforeTransportStopped' ) ; if ( $ evt -> bubbleCancelled ( ) ) { return ; } } try { $ this -> executeCommand ( "QUIT\r\n" , [ 221 ] ) ; } catch ( Swift_TransportException $ e ) { } try { $ this -> buffer -> terminate ( ) ; if ( $ evt ) { $ this -> eventDispatcher -> dispatchEvent ( $ evt , 'transportStopped' ) ; } } catch ( Swift_TransportException $ e ) { $ this -> throwException ( $ e ) ; } } $ this -> started = false ; }
Stop the SMTP connection.
Stop the SMTP connection .