Actions

API16

JMail/addCC

From Joomla! Documentation

< API16:JMail
Revision as of 17:54, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Add carbon copy recipients to the email

[Edit Descripton]

Description:JMail/addCC

Syntax

addCC($cc)
Parameter Name Default Value Description
$cc $cc Either a string or array of strings [e-mail address(es)]

Returns

void

Defined in

libraries/joomla/mail/mail.php

Importing

jimport( 'joomla.mail.mail' );

Source Body

public function addCC($cc)
{
        //If the carbon copy recipient is an aray, add each recipient... otherwise just add the one
        if (isset ($cc))
        {
                if (is_array($cc)) {
                        foreach ($cc as $to) {
                                $to = JMailHelper::cleanLine($to);
                                parent::AddCC($to);
                        }
                } else {
                        $cc = JMailHelper::cleanLine($cc);
                        parent::AddCC($cc);
                }
        }
}

[Edit See Also] SeeAlso:JMail/addCC

Examples

<CodeExamplesForm />

May not always work

addCC may not always work on 1.5 due to an error in the phpmailer class. to forum topic.


E-builds 05:36, 1 March 2011 (CST) Edit comment