Login.php 604 字节
<?php


namespace Lib\Imap\Request;

/**
 * 登录
 * @author:dc
 * @time 2024/9/13 17:09
 * Class Login
 * @package Lib\Imap\Request
 */
class Login extends Request{


    public function exec(): static
    {

        $pwd = addcslashes($this->imap->config->getPassword(),'"');

        $this->cmd('LOGIN "%s" "%s"',$this->imap->config->getEmail(),$pwd);

        return $this;
    }


    /**
     * @param string $msg
     * @return $this
     * @author:dc
     * @time 2025/3/14 10:16
     */
    public function setMsg(string $msg){
        $this->message = $msg;
        return $this;
    }


}