Cc

@deprecated 3.4.0 Use setCc()/getCc() instead.
@param string|array|null $email Null to get, String with email,
Array with email as key, name as value or email as value (without name)
@param string|null $name Name
@return array|$this
351089
public function cc($email = null, $name = null)
    {
        deprecationWarning('Email::cc() is deprecated. Use Email::setCc() or Email::getCc() instead.');

        if ($email === null) {
            return $this->getCc();
        }

        return $this->setCc($email, $name);
    }
610675
public function subscribe(string $email, string $name = '')
    {
        $userList = $this->filter(new IsUserEmail($email))->limit(1)->all();

        $user = $userList[0] ?? new User([
                'email'        => $email,
                'name'         => $name,
                'guid'         => Guid::Generate(),
                'isSubscriber' => 1,
            ]);

        if ((new IsUserSubscriber())->isSatisfiedBy($user)) {
            return null;
        }

        if ($user->id) {
            return $this->update($user->id, ['isSubscriber' => 1]);

        }

        return $this->create($user);
    }
512529
public function setReplyTo($email, $name = null)
    {
        return parent::setReplyTo(
            $this->parseDomainPlaceholderAsPiwikHostName($email),
            $name
        );
    }
1249373
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;
    }
589939
public function from(string $email, string $name = null)
    {
        $this->mailer->setFrom($email, $name ?? '');
        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);
    }
80879
public function addReplyTo($email, $name = null)
    {
        $this->getMailer()->addReplyTo($email, empty($name) ? $email : $name);
        
        return $this;
    }
1068512
public function addCc($address, $name = null)
    {
        $address = $this->_addRecipient('Cc', $address, $name);
        $this->_recipients[$address->email()] = $address;
        return $this;
    }
1239371
public function bcc(string $email, string $name = null)
    {
        $this->mailer->addBCC($email, $name ?? '');
        return $this;
    }
222495
public function addCC($email, $name = null)
    {
        Argument::i()
            ->test(1, 'string')
            ->test(2, 'string', 'null');

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

        return $this;
    }
583799
public function setBcc($email)
    {
        if (is_string($email)) {
            // Means we have a straight email
            $email = [ $email ];
        }

        if (!is_array($email)) {
            throw new InvalidArgumentException(
                'Must be an array of BCC recipients.'
            );
        }

        $this->bcc = [];

        // At this point, `$email` can be an _email array_ or an _array of emails_...
        if (isset($email['email'])) {
            // Means we're not dealing with multiple emails
            $this->addBcc($email);
        } else {
            foreach ($email as $recipient) {
                $this->addBcc($recipient);
            }
        }

        return $this;
    }
323079
public function setEmail(string $email = null) : CNabuDataObject
    {
        parent::setEmail($email);
        return parent::setEmailHash(is_string($email) ? self::encodeEmail($email) : null);
    }
438566
public function add_cc($email, $name = null) {
		if ($this->addressee_exists($email, ['cc'])) {
			return;
		}

		$this->recipients['cc'][] = [
			'name' => $name,
			'email' => strtolower($email),
		];
	}
279927
public function addCc($email, $name = null)
    {
        $this->cc = array_merge($this->cc, $this->transformEmailName($email, $name));

        return $this;
    }
638123
function setSender( $email, $name = false )
    {
        $this->Mail->from = new ezcMailAddress( $email, $name, $this->usedCharset() );
        $this->From = array( 'name' => $name,
                             'email' => $email );
    }
144554
function SetFrom($email,$name="")
	{
		if ($this->DecodeEntities)
		{
			$email = $this->DecodeEntities($email);
			$name = $this->DecodeEntities($name);
		}

		$this->From = new Recipient($email,$name);
	}