Zend_Mail-AddingRecipients.xml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.mail.adding-recipients">
  4. <title>Adding Recipients</title>
  5. <para>
  6. Recipients can be added in three ways:
  7. </para>
  8. <itemizedlist>
  9. <listitem>
  10. <para>
  11. <methodname>addTo()</methodname>: Adds a recipient to the mail with a "To" header
  12. </para>
  13. </listitem>
  14. <listitem>
  15. <para>
  16. <methodname>addCc()</methodname>: Adds a recipient to the mail with a "Cc" header
  17. </para>
  18. </listitem>
  19. <listitem>
  20. <para>
  21. <methodname>addBcc()</methodname>: Adds a recipient to the mail not visible in the
  22. header
  23. </para>
  24. </listitem>
  25. </itemizedlist>
  26. <para>
  27. <methodname>getRecipients()</methodname> serves list of the recipients.
  28. <methodname>clearRecipients()</methodname> clears the list.
  29. </para>
  30. <note>
  31. <title>Additional parameter</title>
  32. <para>
  33. <methodname>addTo()</methodname> and <methodname>addCc()</methodname> accept a second
  34. optional parameter that is used as a human-readable name of the recipient for the
  35. header. Double quotation is changed to single quotation and angle brackets to square
  36. brackets in the parameter.
  37. </para>
  38. </note>
  39. <note>
  40. <title>Optional Usage</title>
  41. <para>
  42. All three of these methods can also accept an array of email addresses
  43. to add instead of one at a time. In the case of <methodname>addTo()</methodname> and
  44. <methodname>addCc()</methodname>, they can be associative arrays where the key is the
  45. human readable name for the recipient.
  46. </para>
  47. </note>
  48. </sect1>
  49. <!--
  50. vim:se ts=4 sw=4 et:
  51. -->