refactor: use new mail interface desing

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-05-14 22:44:28 -04:00
parent b37da945f5
commit ca646eec3c
9 changed files with 311 additions and 200 deletions

View File

@@ -21,6 +21,7 @@ final class Message
private readonly int $uid,
private readonly int $size,
private readonly ?string $internalDate,
private readonly ?string $receivedAt,
private readonly array $flags,
private readonly ?string $subject,
private readonly ?string $sentAt,
@@ -56,6 +57,11 @@ final class Message
return $this->internalDate;
}
public function receivedAt(): ?string
{
return $this->receivedAt;
}
/**
* @return list<string>
*/
@@ -139,7 +145,7 @@ final class Message
public function bodyText(): ?string
{
return $this->bodyText;
return $this->bodySections['TEXT'] ?? null;
}
/**
@@ -160,6 +166,7 @@ final class Message
$this->uid,
$this->size,
$this->internalDate,
$this->receivedAt,
$this->flags,
$this->subject,
$this->sentAt,