How to set CC or BCC emails to EmailModel? Below is my code for sending mail and this is working fine but when i set cc or bcc mail is not sent them.

    $email = new EmailModel();
    $emailSettings = craft()-&gt;email-&gt;getSettings();

    $email-&gt;fromEmail = $emailSettings['emailAddress'];
    $email-&gt;replyTo   = $message-&gt;fromEmail;
    $email-&gt;sender    = $emailSettings['emailAddress'];
    $email-&gt;fromName  = $settings-&gt;prependSender . ($settings-&gt;prependSender &amp;&amp; $message-&gt;fromName ? ' ' : '') . $message-&gt;fromName;
    $email-&gt;toEmail   = $toEmail;
    $email-&gt;cc   = explode(',', $message-&gt;fromEmail);
    $email-&gt;subject   = $settings-&gt;prependSubject . ($settings-&gt;prependSubject &amp;&amp; $message-&gt;subject ? ' - ' : '') . $message-&gt;subject;
    $email-&gt;body      = $message-&gt;message;

    if ($message-&gt;attachment)
    {
        $email-&gt;addAttachment($message-&gt;attachment-&gt;getTempName(), $message-&gt;attachment-&gt;getName(), 'base64', $message-&gt;attachment-&gt;getType());
    }

    craft()-&gt;email-&gt;sendEmail($email);


please correct me where i wrong.

Thanks
The way you do it now only adds email addresses as an array. You'll have to specify both email and name keys too, so it becomes like this:

$email-&gt;cc = array(
    array('email' =&gt; 'email@email.com', 'name' =&gt; 'Name')
);