1 <?php
2 /* --------------------------------------------------------------
3 EmailInterface.inc.php 2015-01-29 gm
4 Gambio GmbH
5 http://www.gambio.de
6 Copyright (c) 2015 Gambio GmbH
7 Released under the GNU General Public License (Version 2)
8 [http://www.gnu.org/licenses/gpl-2.0.html]
9 --------------------------------------------------------------
10 */
11
12 /**
13 * Interface EmailInterface
14 *
15 * @category System
16 * @package Email
17 * @subpackage Interfaces
18 */
19 interface EmailInterface
20 {
21 /**
22 * Sets the ID of an email.
23 *
24 * @param IdType $id E-Mail ID.
25 */
26 public function setId(IdType $id);
27
28
29 /**
30 * Returns the ID of an email.
31 *
32 * @return IdType E-Mail ID.
33 */
34 public function getId();
35
36
37 /**
38 * Sets the sender of an email.
39 *
40 * @param EmailContactInterface $sender E-Mail sender.
41 */
42 public function setSender(EmailContactInterface $sender);
43
44
45 /**
46 * Returns the sender of an email
47 *
48 * @return EmailContactInterface E-Mail sender.
49 */
50 public function getSender();
51
52
53 /**
54 * Sets the recipient of an email.
55 *
56 * @param EmailContactInterface $recipient E-Mail recipient.
57 */
58 public function setRecipient(EmailContactInterface $recipient);
59
60
61 /**
62 * Returns the recipient of an email.
63 *
64 * @return EmailContactInterface E-Mail recipient.
65 */
66 public function getRecipient();
67
68
69 /**
70 * Sets the 'reply to' option value of an email.
71 *
72 * @param EmailContactInterface $recipient E-Mail reply-to.
73 */
74 public function setReplyTo(EmailContactInterface $recipient);
75
76
77 /**
78 * Returns the 'reply to' option value of an email.
79 *
80 * @return EmailContactInterface E-Mail reply-to.
81 */
82 public function getReplyTo();
83
84
85 /**
86 * Sets the subject of an email.
87 *
88 * @param EmailSubjectInterface $subject E-Mail subject.
89 */
90 public function setSubject(EmailSubjectInterface $subject);
91
92
93 /**
94 * Returns the subject of an email.
95 *
96 * @return EmailSubjectInterface E-Mail subject.
97 */
98 public function getSubject();
99
100
101 /**
102 * Sets the plain content of an email.
103 *
104 * @param EmailContentInterface $contentPlain E-Mail plain content.
105 */
106 public function setContentPlain(EmailContentInterface $contentPlain);
107
108
109 /**
110 * Returns the plain content of an email.
111 *
112 * @return EmailContentInterface E-Mail plain content.
113 */
114 public function getContentPlain();
115
116
117 /**
118 * Sets the HTML content of an email.
119 *
120 * @param EmailContentInterface $contentHtml E-Mail HTML content.
121 */
122 public function setContentHtml(EmailContentInterface $contentHtml);
123
124
125 /**
126 * Returns the HTML content of an email.
127 *
128 * @return EmailContentInterface E-Mail HTML content.
129 */
130 public function getContentHtml();
131
132
133 /**
134 * Sets the attachments of an email.
135 *
136 * @param AttachmentCollectionInterface $attachments E-Mail attachments.
137 */
138 public function setAttachments(AttachmentCollectionInterface $attachments);
139
140
141 /**
142 * Returns the attachments of an email.
143 *
144 * @return AttachmentCollectionInterface E-Mail attachments.
145 */
146 public function getAttachments();
147
148
149 /**
150 * Sets the BCC of an email.
151 *
152 * @param ContactCollectionInterface $bcc E-Mail BCC.
153 */
154 public function setBcc(ContactCollectionInterface $bcc);
155
156
157 /**
158 * Returns the BCC of an email.
159 *
160 * @return ContactCollectionInterface E-Mail BCC.
161 */
162 public function getBcc();
163
164
165 /**
166 * Sets the CC of an email.
167 *
168 * @param ContactCollectionInterface $cc E-Mail CC.
169 */
170 public function setCc(ContactCollectionInterface $cc);
171
172
173 /**
174 * Returns the CC of an email.
175 *
176 * @return ContactCollectionInterface E-Mail CC.
177 */
178 public function getCc();
179
180
181 /**
182 * Sets an email status to pending if true is given, else sent.
183 *
184 * @param bool $p_isPending E-Mail pending status.
185 */
186 public function setPending($p_isPending);
187
188
189 /**
190 * Returns if an email is pending or sent.
191 *
192 * @return bool E-Mail pending status.
193 */
194 public function isPending();
195
196
197 /**
198 * Sets the creation date of an email.
199 *
200 * @param DateTime $creationDate E-Mail creation date.
201 */
202 public function setCreationDate(DateTime $creationDate);
203
204
205 /**
206 * Returns the creation date of an email.
207 *
208 * @return DateTime E-Mail creation date.
209 */
210 public function getCreationDate();
211
212
213 /**
214 * Sets the sent date of an email.
215 *
216 * @param DateTime $sentDate E-Mail sent date.
217 */
218 public function setSentDate(DateTime $sentDate);
219
220
221 /**
222 * Returns the sent date of an email.
223 *
224 * @return DateTime E-Mail sent date.
225 */
226 public function getSentDate();
227 }