Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| MailOutgoingMessageDto | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Modules\Mail\Domain\Model; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | /** |
| 12 | * Outgoing Mail Message Data Transfer Object. |
| 13 | * |
| 14 | * Encapsulates message payload for sending via SMTP or storing in Drafts. |
| 15 | * |
| 16 | * @package App\Modules\Mail\Domain\Model |
| 17 | */ |
| 18 | final readonly class MailOutgoingMessageDto |
| 19 | { |
| 20 | /** |
| 21 | * MailOutgoingMessageDto constructor. |
| 22 | * |
| 23 | * @param int $mailboxId Originating ClientMailbox ID. |
| 24 | * @param string $fromEmail Sender email address. |
| 25 | * @param string $fromName Sender display name. |
| 26 | * @param array<string> $to Primary recipients. |
| 27 | * @param array<string> $cc Carbon copy recipients. |
| 28 | * @param array<string> $bcc Blind carbon copy recipients. |
| 29 | * @param string $subject Email subject. |
| 30 | * @param string $htmlBody HTML body content. |
| 31 | * @param string $textBody Fallback plain text content. |
| 32 | * @param array<array<string, mixed>> $attachments List of attachments [{filename, content, mimeType}]. |
| 33 | * @param string|null $replyToMessageId Message-ID being replied to (for In-Reply-To and References). |
| 34 | * @param string|null $existingDraftUid Optional UID of draft being replaced/updated. |
| 35 | */ |
| 36 | public function __construct( |
| 37 | public int $mailboxId, |
| 38 | public string $fromEmail, |
| 39 | public string $fromName, |
| 40 | public array $to, |
| 41 | public array $cc = [], |
| 42 | public array $bcc = [], |
| 43 | public string $subject = '', |
| 44 | public string $htmlBody = '', |
| 45 | public string $textBody = '', |
| 46 | public array $attachments = [], |
| 47 | public ?string $replyToMessageId = null, |
| 48 | public ?string $existingDraftUid = null |
| 49 | ) { |
| 50 | } |
| 51 | } |