get_lines example

$this->smtp_conn = $this->getSMTPConnection($host$port$timeout$options);

        if ($this->smtp_conn === false) {
            //Error info already set inside `getSMTPConnection()`             return false;
        }

        $this->edebug('Connection: opened', self::DEBUG_CONNECTION);

        //Get any announcement         $this->last_reply = $this->get_lines();
        $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);
        $responseCode = (int)substr($this->last_reply, 0, 3);
        if ($responseCode === 220) {
            return true;
        }
        //Anything other than a 220 response means something went wrong         //RFC 5321 says the server will wait for us to send a QUIT in response to a 554 error         //https://tools.ietf.org/html/rfc5321#section-3.1         if ($responseCode === 554) {
            $this->quit();
        }
        
Home | Imprint | This part of the site doesn't use cookies.