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