]> git.mxchange.org Git - friendica.git/blob - src/Object/EMail/IEmail.php
Introduce interface for emailing and create email classes
[friendica.git] / src / Object / EMail / IEmail.php
1 <?php
2
3 namespace Friendica\Object\EMail;
4
5 use Friendica\Util\Emailer;
6
7 /**
8  * Interface for a single mail, which can be send through Emailer::send()
9  *
10  * @see Emailer::send()
11  */
12 interface IEmail
13 {
14         /**
15          * Gets the senders name for this email
16          *
17          * @return string
18          */
19         function getFromName();
20
21         /**
22          * Gets the senders email address for this email
23          *
24          * @return string
25          */
26         function getFromEmail();
27
28         /**
29          * Gets the UID of the sender of this email
30          *
31          * @return int|null
32          */
33         function getRecipientUid();
34
35         /**
36          * Gets the reply-to address for this email
37          *
38          * @return string
39          */
40         function getReplyTo();
41
42         /**
43          * Gets the senders email address
44          *
45          * @return string
46          */
47         function getToEmail();
48
49         /**
50          * Gets the subject of this email
51          *
52          * @return string
53          */
54         function getSubject();
55
56         /**
57          * Gets the message body of this email (either html or plaintext)
58          *
59          * @param boolean $text True, if returned as plaintext
60          *
61          * @return string
62          */
63         function getMessage(bool $text = false);
64
65         /**
66          * Gets any additional mail header
67          *
68          * @return string
69          */
70         function getAdditionalMailHeader();
71 }