1 <?xml version="1.0" encoding="UTF-8"?>
3 <sect1 id="zend.mail.adding-recipients">
4 <title>Adding Recipients</title>
7 Recipients can be added in three ways:
13 <methodname>addTo()</methodname>: Adds a recipient to the mail with a "To" header
19 <methodname>addCc()</methodname>: Adds a recipient to the mail with a "Cc" header
25 <methodname>addBcc()</methodname>: Adds a recipient to the mail not visible in the
32 <methodname>getRecipients()</methodname> serves list of the recipients.
33 <methodname>clearRecipients()</methodname> clears the list.
37 <title>Additional parameter</title>
40 <methodname>addTo()</methodname> and <methodname>addCc()</methodname> accept a second
41 optional parameter that is used as a human-readable name of the recipient for the
42 header. Double quotation is changed to single quotation and angle brackets to square
43 brackets in the parameter.
48 <title>Optional Usage</title>
51 All three of these methods can also accept an array of email addresses
52 to add instead of one at a time. In the case of <methodname>addTo()</methodname> and
53 <methodname>addCc()</methodname>, they can be associative arrays where the key is the
54 human readable name for the recipient.