_doHeloCommand() protected method

Send the HELO welcome
protected _doHeloCommand ( )
Esempio n. 1
0
 /** Overridden to perform EHLO instead */
 protected function _doHeloCommand()
 {
     try {
         $response = $this->executeCommand(sprintf("EHLO %s\r\n", $this->_domain), array(250));
     } catch (Swift_TransportException $e) {
         return parent::_doHeloCommand();
     }
     if ($this->_params['tls']) {
         try {
             $this->executeCommand("STARTTLS\r\n", array(220));
             if (!$this->_buffer->startTLS()) {
                 throw new Swift_TransportException('Unable to connect with TLS encryption');
             }
             try {
                 $response = $this->executeCommand(sprintf("EHLO %s\r\n", $this->_domain), array(250));
             } catch (Swift_TransportException $e) {
                 return parent::_doHeloCommand();
             }
         } catch (Swift_TransportException $e) {
             $this->_throwException($e);
         }
     }
     $this->_capabilities = $this->_getCapabilities($response);
     $this->_setHandlerParams();
     foreach ($this->_getActiveHandlers() as $handler) {
         $handler->afterEhlo($this);
     }
 }
Esempio n. 2
0
 /** Overridden to perform EHLO instead */
 protected function _doHeloCommand()
 {
     try {
         $response = $this->executeCommand(sprintf("EHLO %s\r\n", $this->_domain), array(250));
         $this->_capabilities = $this->_getCapabilities($response);
         $this->_setHandlerParams();
         foreach ($this->_getActiveHandlers() as $handler) {
             $handler->afterEhlo($this);
         }
     } catch (Swift_TransportException $e) {
         parent::_doHeloCommand();
     }
 }