|
@@ -68,6 +68,16 @@ class Mail { |
|
@@ -68,6 +68,16 @@ class Mail { |
68
|
$this->client->login($host['host'].':'.$host['port'],$this->username,$this->password);
|
68
|
$this->client->login($host['host'].':'.$host['port'],$this->username,$this->password);
|
69
|
}catch (\Throwable $e){
|
69
|
}catch (\Throwable $e){
|
70
|
if($pass_err && $e->getCode() == 403){
|
70
|
if($pass_err && $e->getCode() == 403){
|
|
|
71
|
+ // 是否是密码错误
|
|
|
72
|
+ foreach (['NO [ALERT] Invalid credentials (Failure)'] as $em){
|
|
|
73
|
+ if(strpos($e->getMessage(),$em)!==false){
|
|
|
74
|
+ db()->update(
|
|
|
75
|
+ \Model\emailSql::$table,
|
|
|
76
|
+ ['pwd_error'=>1],
|
|
|
77
|
+ dbWhere(['email'=>$this->username])
|
|
|
78
|
+ );
|
|
|
79
|
+ }
|
|
|
80
|
+ }
|
71
|
// 一天中超过 3次失败说明密码错误了
|
81
|
// 一天中超过 3次失败说明密码错误了
|
72
|
// if(redis()->incr('email_login_error:'.md5($this->username),86400) > 10){
|
82
|
// if(redis()->incr('email_login_error:'.md5($this->username),86400) > 10){
|
73
|
// 登录失败了 ,
|
83
|
// 登录失败了 ,
|