Aleksander Machniak
2015-07-26 67229a86df38c9c2ef94f6506b43150a2e510efd
Don't use private properties of Net_SMTP object

Conflicts:
program/lib/Roundcube/rcube_smtp.php
1 files modified
13 ■■■■■ changed files
program/lib/Roundcube/rcube_smtp.php 13 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_smtp.php
@@ -127,9 +127,10 @@
        $result = $this->conn->connect($CONFIG['smtp_timeout']);
        if (PEAR::isError($result)) {
            $this->response[] = "Connection failed: ".$result->getMessage();
            $this->error = array('label' => 'smtpconnerror', 'vars' => array('code' => $this->conn->_code));
            list($code,) = $this->conn->getResponse();
            $this->error = array('label' => 'smtpconnerror', 'vars' => array('code' => $code));
            $this->conn  = null;
            return false;
        }
@@ -160,10 +161,14 @@
            $result = $this->conn->auth($smtp_user, $smtp_pass, $smtp_auth_type, $use_tls, $smtp_authz);
            if (PEAR::isError($result)) {
                $this->error = array('label' => 'smtpautherror', 'vars' => array('code' => $this->conn->_code));
                $this->response[] .= 'Authentication failure: ' . $result->getMessage() . ' (Code: ' . $result->getCode() . ')';
                list($code,) = $this->conn->getResponse();
                $this->error = array('label' => 'smtpautherror', 'vars' => array('code' => $code));
                $this->response[] = 'Authentication failure: ' . $result->getMessage()
                    . ' (Code: ' . $result->getCode() . ')';
                $this->reset();
                $this->disconnect();
                return false;
            }
        }