/** 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);
}
}