generated from Nodarx/template
feat: append command
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -27,6 +27,21 @@ final class ProtocolWriter
|
||||
$this->connection->write($wire);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write raw bytes to the connection without tagging or logging the payload.
|
||||
*
|
||||
* Used to send literal data (e.g. an APPEND message body) after the server
|
||||
* has issued a command continuation request.
|
||||
*/
|
||||
public function writeRaw(string $payload): void
|
||||
{
|
||||
$this->logger?->debug('IMAP literal sent (bytes={bytes})', [
|
||||
'bytes' => strlen($payload),
|
||||
]);
|
||||
|
||||
$this->connection->write($payload);
|
||||
}
|
||||
|
||||
private function sanitizeWire(string $wire): string
|
||||
{
|
||||
$trimmed = rtrim($wire, "\r\n");
|
||||
|
||||
Reference in New Issue
Block a user