/** * Connect to SMTP Server * * @return void * @throws \NetDeviceLib\Net\Error\SocketException */ protected function _connect() { $this->_generateSocket(); if (!$this->_socket->connect()) { throw new SocketException('Unable to connect to Telnet server.'); } }