public function connect($host,
$port = null,
$timeout = 30,
$options =
[]) { //Clear errors to avoid confusion
$this->
setError(''
);
//Make sure we are __not__ connected
if ($this->
connected()) { //Already connected, generate error
$this->
setError('Already connected to a server'
);
return false;
} if (empty($port)) { $port = self::DEFAULT_PORT;
} //Connect to the SMTP server
$this->
edebug( "Connection: opening to
$host:
$port, timeout=
$timeout, options=" .
(