getSmtpErrorMessage example

$this->smtp->hello($hello);
                    //Automatically enable TLS encryption if:                     //* it's not disabled                     //* we have openssl extension                     //* we are not already using SSL                     //* the server offers STARTTLS                     if ($this->SMTPAutoTLS && $sslext && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS')) {
                        $tls = true;
                    }
                    if ($tls) {
                        if (!$this->smtp->startTLS()) {
                            $message = $this->getSmtpErrorMessage('connect_host');
                            throw new Exception($message);
                        }
                        //We must resend EHLO after TLS negotiation                         $this->smtp->hello($hello);
                    }
                    if (
                        $this->SMTPAuth && !$this->smtp->authenticate(
                            $this->Username,
                            $this->Password,
                            $this->AuthType,
                            $this->oauth
                        )
Home | Imprint | This part of the site doesn't use cookies.