public function start()
{
if (!$this->_started) {
if ($evt = $this->_eventDispatcher->createTransportChangeEvent($this)) {
$this->_eventDispatcher->dispatchEvent($evt, 'beforeTransportStarted');
if ($evt->bubbleCancelled()) {
return;
}
}
try {
$this->_buffer->initialize($this->_getBufferParams());
} catch (Swift_TransportException $e) {
$this->_throwException($e);
}
$this->_readGreeting();
$this->_doHeloCommand();
if ($evt) {
$this->_eventDispatcher->dispatchEvent($evt, 'transportStarted');
}
$this->_started = true;
}
}