PHPMailer\PHPMailer
POP3::login
Log in to the POP3 server. Does not support APOP (RFC 2828, 4949).
Метод класса: POP3{}
Хуков нет.
Возвращает
true|false.
Использование
$POP3 = new POP3(); $POP3->login( $username, $password );
- $username(строка)
- .
По умолчанию:'' - $password(строка)
- .
По умолчанию:''
Код POP3::login() POP3::login WP 6.9.4
public function login($username = '', $password = '')
{
if (!$this->connected) {
$this->setError('Not connected to POP3 server');
return false;
}
if (empty($username)) {
$username = $this->username;
}
if (empty($password)) {
$password = $this->password;
}
//Send the Username
$this->sendString("USER $username" . static::LE);
$pop3_response = $this->getResponse();
if ($this->checkResponse($pop3_response)) {
//Send the Password
$this->sendString("PASS $password" . static::LE);
$pop3_response = $this->getResponse();
if ($this->checkResponse($pop3_response)) {
return true;
}
}
return false;
}