Swift_Transport_AbstractSmtpTransport::_doHeloCommand PHP Method

_doHeloCommand() protected method

Send the HELO welcome
protected _doHeloCommand ( )
    protected function _doHeloCommand()
    {
        $this->executeCommand(sprintf("HELO %s\r\n", $this->_domain), array(250));
    }

Usage Example

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);
     }
 }
All Usage Examples Of Swift_Transport_AbstractSmtpTransport::_doHeloCommand