| | |
| | | |
| | | if (is_a($result, 'PEAR_Error')) { |
| | | $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; |
| | | } |
| | | |
| | |
| | | $result = $this->conn->auth($smtp_user, $smtp_pass, $smtp_auth_type, $use_tls, $smtp_authz); |
| | | |
| | | if (is_a($result, 'PEAR_Error')) { |
| | | $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; |
| | | } |
| | | } |