作者 邓超

m

... ... @@ -5,6 +5,7 @@ namespace Lib\Imap;
use Lib\Imap\Request\Folder;
use Lib\Imap\Request\Folders;
use Lib\Imap\Request\Login;
use Lib\Imap\Request\Logout;
use Lib\Imap\Request\Noop;
class Imap {
... ... @@ -137,4 +138,15 @@ class Imap {
}
public function __destruct()
{
// 退出登录
(new Logout($this))->exec();
unset($this->client);
// TODO: Implement __destruct() method.
}
}
\ No newline at end of file
... ...
... ... @@ -127,5 +127,10 @@ class ImapClient {
}
public function __destruct()
{
unset($this->socket);
// TODO: Implement __destruct() method.
}
}
\ No newline at end of file
... ...
<?php
namespace Lib\Imap\Request;
/**
* 退出登录
* @author:dc
* @time 2024/9/24 11:10
* Class Logout
* @package Lib\Imap\Request
*/
class Logout extends Request{
public function exec(): static
{
$this->cmd('LOGOUT');
return $this;
}
}
\ No newline at end of file
... ...