4
* This file is part of SwiftMailer.
5
* (c) 2004-2009 Chris Corbyn
7
* For the full copyright and license information, please view the LICENSE
8
* file that was distributed with this source code.
11
//@require 'Swift/Mime/MimeEntity.php';
14
* A Message (RFC 2822) object.
19
* @author Chris Corbyn
21
interface Swift_Mime_Message extends Swift_Mime_MimeEntity
25
* Generates a valid Message-ID and switches to it.
29
public function generateId();
32
* Set the subject of the message.
34
* @param string $subject
36
public function setSubject($subject);
39
* Get the subject of the message.
43
public function getSubject();
46
* Set the origination date of the message as a UNIX timestamp.
50
public function setDate($date);
53
* Get the origination date of the message as a UNIX timestamp.
57
public function getDate();
60
* Set the return-path (bounce-detect) address.
62
* @param string $address
64
public function setReturnPath($address);
67
* Get the return-path (bounce-detect) address.
71
public function getReturnPath();
74
* Set the sender of this message.
76
* If multiple addresses are present in the From field, this SHOULD be set.
78
* According to RFC 2822 it is a requirement when there are multiple From
79
* addresses, but Swift itself does not require it directly.
81
* An associative array (with one element!) can be used to provide a display-
82
* name: i.e. array('email@address' => 'Real Name').
84
* If the second parameter is provided and the first is a string, then $name
85
* is associated with the address.
87
* @param mixed $address
88
* @param string $name optional
90
public function setSender($address, $name = null);
93
* Get the sender address for this message.
95
* This has a higher significance than the From address.
99
public function getSender();
102
* Set the From address of this message.
104
* It is permissible for multiple From addresses to be set using an array.
106
* If multiple From addresses are used, you SHOULD set the Sender address and
107
* according to RFC 2822, MUST set the sender address.
109
* An array can be used if display names are to be provided: i.e.
110
* array('email@address.com' => 'Real Name').
112
* If the second parameter is provided and the first is a string, then $name
113
* is associated with the address.
115
* @param mixed $addresses
116
* @param string $name optional
118
public function setFrom($addresses, $name = null);
121
* Get the From address(es) of this message.
123
* This method always returns an associative array where the keys are the
128
public function getFrom();
131
* Set the Reply-To address(es).
133
* Any replies from the receiver will be sent to this address.
135
* It is permissible for multiple reply-to addresses to be set using an array.
137
* This method has the same synopsis as {@link setFrom()} and {@link setTo()}.
139
* If the second parameter is provided and the first is a string, then $name
140
* is associated with the address.
142
* @param mixed $addresses
143
* @param string $name optional
145
public function setReplyTo($addresses, $name = null);
148
* Get the Reply-To addresses for this message.
150
* This method always returns an associative array where the keys provide the
155
public function getReplyTo();
158
* Set the To address(es).
160
* Recipients set in this field will receive a copy of this message.
162
* This method has the same synopsis as {@link setFrom()} and {@link setCc()}.
164
* If the second parameter is provided and the first is a string, then $name
165
* is associated with the address.
167
* @param mixed $addresses
168
* @param string $name optional
170
public function setTo($addresses, $name = null);
173
* Get the To addresses for this message.
175
* This method always returns an associative array, whereby the keys provide
176
* the actual email addresses.
180
public function getTo();
183
* Set the Cc address(es).
185
* Recipients set in this field will receive a 'carbon-copy' of this message.
187
* This method has the same synopsis as {@link setFrom()} and {@link setTo()}.
189
* @param mixed $addresses
190
* @param string $name optional
192
public function setCc($addresses, $name = null);
195
* Get the Cc addresses for this message.
197
* This method always returns an associative array, whereby the keys provide
198
* the actual email addresses.
202
public function getCc();
205
* Set the Bcc address(es).
207
* Recipients set in this field will receive a 'blind-carbon-copy' of this
210
* In other words, they will get the message, but any other recipients of the
211
* message will have no such knowledge of their receipt of it.
213
* This method has the same synopsis as {@link setFrom()} and {@link setTo()}.
215
* @param mixed $addresses
216
* @param string $name optional
218
public function setBcc($addresses, $name = null);
221
* Get the Bcc addresses for this message.
223
* This method always returns an associative array, whereby the keys provide
224
* the actual email addresses.
228
public function getBcc();