Jyxo\Mail\Sender\Smtp::connect PHP Method

connect() public method

Connects to the SMTP server.
public connect ( ) : self
return self
    public function connect() : self
    {
        $this->connection = fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);
        if (false === $this->connection) {
            throw new SmtpException('CONNECTION: ' . $errno . ' ' . $errstr);
        }
        // Reads the initial connection data
        $this->readData();
        // Sends EHLO/HELO
        $this->commandHelo();
        return $this;
    }