-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathEmail.php
More file actions
56 lines (47 loc) · 1.21 KB
/
Email.php
File metadata and controls
56 lines (47 loc) · 1.21 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace Utopia\Messaging\Messages;
use Utopia\Messaging\Message;
class Email implements Message
{
/**
* @param array $to The recipients of the email.
* @param string $subject The subject of the email.
* @param string $content The content of the email.
* @param string|null $from The sender of the email.
* @param array|null $attachments The attachments of the email.
* @param bool $html Whether the message is HTML or not.
*/
public function __construct(
private array $to,
private string $subject,
private string $content,
private ?string $from = null,
private ?array $attachments = null,
private bool $html = false
) {
}
public function getTo(): array
{
return $this->to;
}
public function getSubject(): string
{
return $this->subject;
}
public function getContent(): string
{
return $this->content;
}
public function getFrom(): ?string
{
return $this->from;
}
public function getAttachments(): ?array
{
return $this->attachments;
}
public function isHtml(): bool
{
return $this->html;
}
}