Zend_Mail::addCc PHP Method

addCc() public method

Adds Cc-header and recipient, $email can be an array, or a single string address
public addCc ( string | array $email, string $name = '' ) : Zend_Mail
$email string | array
$name string
return Zend_Mail Provides fluent interface
    public function addCc($email, $name = '')
    {
        if (!is_array($email)) {
            $email = array($name => $email);
        }
        foreach ($email as $n => $recipient) {
            $this->_addRecipientAndHeader('Cc', $recipient, is_int($n) ? '' : $n);
        }
        return $this;
    }

Usage Example

Example #1
0
 function __construct($template)
 {
     $this->_mailer = new Zend_Mail('koi8-r');
     $this->_view = new Zend_View();
     $this->_template = $template;
     $this->_view->setScriptPath(APPLICATION_PATH . '/views/scripts/email');
     $config = Bootstrap::get('config');
     $this->_mailer->addCc($config["mail"]["kadavr"]);
     $this->_mailer->addCc($config["mail"]["cc"]);
 }
All Usage Examples Of Zend_Mail::addCc