Avail feature updated
[ninja.git] / application / vendor / swiftmailer / classes / Swift / Mime / Message.php
blob0496c08773daa1d2a55f4b337599fed18f6e53cc
1 <?php
3 /*
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.
9 */
11 //@require 'Swift/Mime/MimeEntity.php';
13 /**
14 * A Message (RFC 2822) object.
16 * @package Swift
17 * @subpackage Mime
19 * @author Chris Corbyn
21 interface Swift_Mime_Message extends Swift_Mime_MimeEntity
24 /**
25 * Generates a valid Message-ID and switches to it.
27 * @return string
29 public function generateId();
31 /**
32 * Set the subject of the message.
34 * @param string $subject
36 public function setSubject($subject);
38 /**
39 * Get the subject of the message.
41 * @return string
43 public function getSubject();
45 /**
46 * Set the origination date of the message as a UNIX timestamp.
48 * @param int $date
50 public function setDate($date);
52 /**
53 * Get the origination date of the message as a UNIX timestamp.
55 * @return int
57 public function getDate();
59 /**
60 * Set the return-path (bounce-detect) address.
62 * @param string $address
64 public function setReturnPath($address);
66 /**
67 * Get the return-path (bounce-detect) address.
69 * @return string
71 public function getReturnPath();
73 /**
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);
92 /**
93 * Get the sender address for this message.
95 * This has a higher significance than the From address.
97 * @return string
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
124 * addresses.
126 * @return string[]
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
151 * email addresses.
153 * @return string[]
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.
178 * @return string[]
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.
200 * @return string[]
202 public function getCc();
205 * Set the Bcc address(es).
207 * Recipients set in this field will receive a 'blind-carbon-copy' of this
208 * message.
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.
226 * @return string[]
228 public function getBcc();