Don't use private properties of Net_SMTP object

Conflicts:
	program/lib/Roundcube/rcube_smtp.php
release-1.0
Aleksander Machniak 9 years ago
parent d1fa2f7f7a
commit 67229a86df

@ -127,9 +127,10 @@ class rcube_smtp
$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 @@ class rcube_smtp
$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;
}
}

Loading…
Cancel
Save