PageRenderTime 22ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/framework/vendor/swift/lib/classes/Swift/Mime/Message.php

http://zoop.googlecode.com/
PHP | 230 lines | 23 code | 23 blank | 184 comment | 0 complexity | ad5015bc30ded0e1a8b177931bd2bfc4 MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.1
  1. <?php
  2. /*
  3. * This file is part of SwiftMailer.
  4. * (c) 2004-2009 Chris Corbyn
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. //@require 'Swift/Mime/MimeEntity.php';
  10. /**
  11. * A Message (RFC 2822) object.
  12. *
  13. * @package Swift
  14. * @subpackage Mime
  15. *
  16. * @author Chris Corbyn
  17. */
  18. interface Swift_Mime_Message extends Swift_Mime_MimeEntity
  19. {
  20. /**
  21. * Generates a valid Message-ID and switches to it.
  22. *
  23. * @return string
  24. */
  25. public function generateId();
  26. /**
  27. * Set the subject of the message.
  28. *
  29. * @param string $subject
  30. */
  31. public function setSubject($subject);
  32. /**
  33. * Get the subject of the message.
  34. *
  35. * @return string
  36. */
  37. public function getSubject();
  38. /**
  39. * Set the origination date of the message as a UNIX timestamp.
  40. *
  41. * @param int $date
  42. */
  43. public function setDate($date);
  44. /**
  45. * Get the origination date of the message as a UNIX timestamp.
  46. *
  47. * @return int
  48. */
  49. public function getDate();
  50. /**
  51. * Set the return-path (bounce-detect) address.
  52. *
  53. * @param string $address
  54. */
  55. public function setReturnPath($address);
  56. /**
  57. * Get the return-path (bounce-detect) address.
  58. *
  59. * @return string
  60. */
  61. public function getReturnPath();
  62. /**
  63. * Set the sender of this message.
  64. *
  65. * If multiple addresses are present in the From field, this SHOULD be set.
  66. *
  67. * According to RFC 2822 it is a requirement when there are multiple From
  68. * addresses, but Swift itself does not require it directly.
  69. *
  70. * An associative array (with one element!) can be used to provide a display-
  71. * name: i.e. array('email@address' => 'Real Name').
  72. *
  73. * If the second parameter is provided and the first is a string, then $name
  74. * is associated with the address.
  75. *
  76. * @param mixed $address
  77. * @param string $name optional
  78. */
  79. public function setSender($address, $name = null);
  80. /**
  81. * Get the sender address for this message.
  82. *
  83. * This has a higher significance than the From address.
  84. *
  85. * @return string
  86. */
  87. public function getSender();
  88. /**
  89. * Set the From address of this message.
  90. *
  91. * It is permissible for multiple From addresses to be set using an array.
  92. *
  93. * If multiple From addresses are used, you SHOULD set the Sender address and
  94. * according to RFC 2822, MUST set the sender address.
  95. *
  96. * An array can be used if display names are to be provided: i.e.
  97. * array('email@address.com' => 'Real Name').
  98. *
  99. * If the second parameter is provided and the first is a string, then $name
  100. * is associated with the address.
  101. *
  102. * @param mixed $addresses
  103. * @param string $name optional
  104. */
  105. public function setFrom($addresses, $name = null);
  106. /**
  107. * Get the From address(es) of this message.
  108. *
  109. * This method always returns an associative array where the keys are the
  110. * addresses.
  111. *
  112. * @return string[]
  113. */
  114. public function getFrom();
  115. /**
  116. * Set the Reply-To address(es).
  117. *
  118. * Any replies from the receiver will be sent to this address.
  119. *
  120. * It is permissible for multiple reply-to addresses to be set using an array.
  121. *
  122. * This method has the same synopsis as {@link setFrom()} and {@link setTo()}.
  123. *
  124. * If the second parameter is provided and the first is a string, then $name
  125. * is associated with the address.
  126. *
  127. * @param mixed $addresses
  128. * @param string $name optional
  129. */
  130. public function setReplyTo($addresses, $name = null);
  131. /**
  132. * Get the Reply-To addresses for this message.
  133. *
  134. * This method always returns an associative array where the keys provide the
  135. * email addresses.
  136. *
  137. * @return string[]
  138. */
  139. public function getReplyTo();
  140. /**
  141. * Set the To address(es).
  142. *
  143. * Recipients set in this field will receive a copy of this message.
  144. *
  145. * This method has the same synopsis as {@link setFrom()} and {@link setCc()}.
  146. *
  147. * If the second parameter is provided and the first is a string, then $name
  148. * is associated with the address.
  149. *
  150. * @param mixed $addresses
  151. * @param string $name optional
  152. */
  153. public function setTo($addresses, $name = null);
  154. /**
  155. * Get the To addresses for this message.
  156. *
  157. * This method always returns an associative array, whereby the keys provide
  158. * the actual email addresses.
  159. *
  160. * @return string[]
  161. */
  162. public function getTo();
  163. /**
  164. * Set the Cc address(es).
  165. *
  166. * Recipients set in this field will receive a 'carbon-copy' of this message.
  167. *
  168. * This method has the same synopsis as {@link setFrom()} and {@link setTo()}.
  169. *
  170. * @param mixed $addresses
  171. * @param string $name optional
  172. */
  173. public function setCc($addresses, $name = null);
  174. /**
  175. * Get the Cc addresses for this message.
  176. *
  177. * This method always returns an associative array, whereby the keys provide
  178. * the actual email addresses.
  179. *
  180. * @return string[]
  181. */
  182. public function getCc();
  183. /**
  184. * Set the Bcc address(es).
  185. *
  186. * Recipients set in this field will receive a 'blind-carbon-copy' of this
  187. * message.
  188. *
  189. * In other words, they will get the message, but any other recipients of the
  190. * message will have no such knowledge of their receipt of it.
  191. *
  192. * This method has the same synopsis as {@link setFrom()} and {@link setTo()}.
  193. *
  194. * @param mixed $addresses
  195. * @param string $name optional
  196. */
  197. public function setBcc($addresses, $name = null);
  198. /**
  199. * Get the Bcc addresses for this message.
  200. *
  201. * This method always returns an associative array, whereby the keys provide
  202. * the actual email addresses.
  203. *
  204. * @return string[]
  205. */
  206. public function getBcc();
  207. }