-
-
Notifications
You must be signed in to change notification settings - Fork 158
Expand file tree
/
Copy pathGenericEmail.php
More file actions
36 lines (32 loc) · 1.07 KB
/
GenericEmail.php
File metadata and controls
36 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace Tempest\Mail;
use Tempest\View\View;
final class GenericEmail implements Email, HasTextContent, HasAttachments
{
public Envelope $envelope {
get => new Envelope(
subject: $this->subject,
to: $this->to,
from: $this->from,
cc: $this->cc,
bcc: $this->bcc,
replyTo: $this->replyTo,
headers: $this->headers,
priority: $this->priority,
);
}
public function __construct(
public ?string $subject,
public null|string|array|EmailAddress $to,
public string|View $html,
public string|View|null $text = null,
public null|string|array|EmailAddress $from = null,
public null|string|array|EmailAddress $cc = null,
public null|string|array|EmailAddress $bcc = null,
public null|string|array|EmailAddress $replyTo = null,
public array $headers = [],
public EmailPriority $priority = EmailPriority::NORMAL,
/** @var Attachment[] */
public array $attachments = [],
) {}
}