feat: append command

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-06-23 15:13:42 -04:00
parent c8f0f8328b
commit 3dd9c2f983
5 changed files with 155 additions and 8 deletions
+3 -2
View File
@@ -12,6 +12,7 @@ namespace KTXM\ProviderImap\Service\Remote;
use DateTimeImmutable;
use Generator;
use KTXM\ProviderImap\Client\Client;
use KTXM\ProviderImap\Client\Command\AppendCommand;
use KTXM\ProviderImap\Client\Command\FetchManyCommand;
use KTXM\ProviderImap\Client\Command\FetchOneCommand;
use KTXM\ProviderImap\Client\Command\ExpungeCommand;
@@ -410,9 +411,9 @@ class RemoteMailService
*
* @param string[] $flags optional initial flags, e.g. ['\\Seen']
*/
public function entityCreate(string $collection, string $rawMessage, array $flags = []): int
public function entityCreate(string $collection, string $rawMessage, array $flags = []): ?int
{
return $this->client->append($rawMessage, $collection, !empty($flags) ? $flags : null);
return $this->client->perform(new AppendCommand($collection, $rawMessage, $flags));
}
/**