Add Carbon copies

Works like the 'to' function.

@param string 		$email
@param string 		$name
@return self
9568
public function cc( $email, $name = null ) 
	{	
		if ( !is_array( $email ) ) 
		{
			$email = array( $email => $name );
		}
		
		foreach( $email as $address => $name )
		{
			if ( is_numeric( $address ) && is_string( $name ) )
			{
				$this->cc[$name] = null;
			}
			else
			{
				$this->cc[$address] = $name;
			}
		}
		
		return $this;
	}
588595
public function from($name, $email)
    {
        $this->from_email = $email;
        $this->from_name = $name;

        return $this;
    }
42866
public function addBcc($email, $name = null)
    {
        $this->bcc = array_merge($this->bcc, $this->transformEmailName($email, $name));

        return $this;
    }
924918
public function to($mail, $name = null)
    {
        $this->message->addTo($mail, $name);
        return $this;
    }
498849
public function ccAddress($email, $name = null)
    {
        $this->getMailer()->addCC($email, (empty($name)) ? $email : $name);

        return $this;
    }
1344463
public function addTo(string $email, string $name = null): self // addRecipient()
    {
        $this->setHeader('To', $this->formatEmail($email, $name), true);

        return $this;
    }
221712
protected function getMailer($name, Email $email = null)
    {
        if ($email === null) {
            $email = new Email();
        }

        $className = App::className($name, 'Mailer', 'Mailer');

        if (empty($className)) {
            throw new MissingMailerException(compact('name'));
        }

        return new $className($email);
    }
144554
function SetFrom($email,$name="")
	{
		if ($this->DecodeEntities)
		{
			$email = $this->DecodeEntities($email);
			$name = $this->DecodeEntities($name);
		}

		$this->From = new Recipient($email,$name);
	}
513378
public function addRecipient($name, $email, $amount) {
    $this->recipients->addRecipient($name, $email, $amount);
    return $this;
  }
758307
public function setFrom($email, $name = null)
    {
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            throw new \Parable\Mail\Exception("Email provided is invalid: {$email}");
        }
        $this->addresses['from'] = [
            [
                'email' => $email,
                'name'  => $name,
            ]
        ];
        return $this;
    }
1358509
public function setFrom(string $email, string $name = null): self
	{
		$this->message->setFrom($email, $name);
		return $this;
	}
1142124
public function address($email, $name = null)
    {
        $this->getMailer()->addAddress($email, (empty($name)) ? $email : $name);

        return $this;
    }
512529
public function setReplyTo($email, $name = null)
    {
        return parent::setReplyTo(
            $this->parseDomainPlaceholderAsPiwikHostName($email),
            $name
        );
    }
504964
public function setTo($email, $name = '')
    {
        if (empty($email)) {
            throw new MailerException('email is required for setTo!');
        }

        if (empty($name)) {
            $name = substr($email, 0, strrpos($email, '@'));
        }

        if (is_null($this->to)) {
            $this->to = [$email, $name];
        } else {
            throw new MailerException('A master recipient has already been set!');
        }

        return $this;
    }
1276887
public function addTo($address, $name = null)
    {
        $address = $this->_addRecipient('To', $address, $name);
        $this->_recipients[$address->email()] = $address;
        return $this;
    }
752700
public function to($email, $name = null) {

		if(false === $this -> validateEmail($email)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be a valid email', __METHOD__), E_USER_ERROR);
		}

		if(null !== $name && false === is_string($name)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($name)), E_USER_ERROR);
		}

		if(false === isset($this -> headers['to'])) {
			$this -> headers['to'] = [];
		}

		$this -> headers['to'][] = (object) ['email' => $email, 'name' => $name];

		return $this;	
	}
1176187
public function addCC( $ccEmail, $ccName = null ) {
		if( !is_null( $ccName ) ) {
			$this->mCC[$ccName] = $ccEmail;
		} else {
			$this->mCC[] = $ccEmail;
		}
	}