edebug example

//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=" .
            (count($options) > 0 ? var_export($options, true) : 'array()'),
            self::DEBUG_CONNECTION
        );

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

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

        

    private function mailPassthru($to$subject$body$header$params)
    {
        //Check overloading of mail function to avoid double-encoding         if ((int)ini_get('mbstring.func_overload') & 1) { // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated             $subject = $this->secureHeader($subject);
        } else {
            $subject = $this->encodeHeader($this->secureHeader($subject));
        }
        //Calling mail() with null params breaks         $this->edebug('Sending with mail()');
        $this->edebug('Sendmail path: ' . ini_get('sendmail_path'));
        $this->edebug("Envelope sender: {$this->Sender}");
        $this->edebug("To: {$to}");
        $this->edebug("Subject: {$subject}");
        $this->edebug("Headers: {$header}");
        if (!$this->UseSendmailOptions || null === $params) {
            $result = @mail($to$subject$body$header);
        } else {
            $this->edebug("Additional params: {$params}");
            $result = @mail($to$subject$body$header$params);
        }
        
Home | Imprint | This part of the site doesn't use cookies.