Programmer's Reference Guide
| Attachments |
Adding Recipients
Recipients can be added in three ways:
-
addTo(): Adds a recipient to the mail with a "To" header
-
addCc(): Adds a recipient to the mail with a "Cc" header
-
addBcc(): Adds a recipient to the mail not visible in the header
getRecipients() serves list of the recipients. clearRecipients() clears the list.
Note: Additional parameter
addTo() and addCc() 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.
Note: Optional Usage
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 addTo() and addCc(), they can be associative arrays where the key is the human readable name for the recipient.
| Attachments |
Add A Comment
Please do not report issues via comments; use the ZF Issue Tracker.
If you have a JIRA/Crowd account, we suggest you login first before commenting.
Select a Version
Languages Available
Components
Search the Manual
Navigation
- Programmer's Reference Guide
- Programmer's Reference Guide
- Zend Framework Reference
- Zend_Mail
- Introduction
- Sending via SMTP
- Sending Multiple Mails per SMTP Connection
- Using Different Transports
- HTML E-Mail
- Attachments
- Adding Recipients
- Controlling the MIME Boundary
- Additional Headers
- Character Sets
- Encoding
- SMTP Authentication
- Securing SMTP Transport
- Reading Mail Messages

Comments