Add the email setting on a BccSettings object

@param string $email The email address that you would like
to receive the BCC

@throws TypeException
483004
public function setEmail($email)
    {
        if (!is_string($email) &&
            filter_var($email, FILTER_VALIDATE_EMAIL)
        ) {
            throw new TypeException(
                '$email must valid and be of type string.'
            );
        }
        $this->email = $email;
    }
1042215
public void setBcc(Object bcc) throws ApplicationException {
	if (StringUtil.isEmpty(bcc)) return;
	try {
	    smtp.addBCC(bcc);
	}
	catch (Exception e) {
	    throw new ApplicationException("attribute [bcc] of the tag [mail] is invalid", e.getMessage());
	}
    }
207591
public function setEmail($email): User
    {
        if ($this->email !== $email) {
            $this->email = $email;

            DB::table('user')
                ->where('user_id', '=', $this->user_id)
                ->update([
                    'email' => $email,
                ]);
        }

        return $this;
    }
607295
public function setEmail($email)
    {
        $validator = new EmailValidator();
        if ($validator->validate($email)) {
            $this->_email = $email;
        } else {
            $this->_email = false;
        }
    }
117168
public function thereAreNoUsersWithTheEmail($email)
    {
        $users = $this->getRepository()->getUserService()->loadUsersByEmail($email);
        Assertion::assertEquals(0, count($users), "Users with the email '$email' exist");
    }
710579
public function setRecipients($email)
    {
        if (!is_array($email)) {
            $email = explode(',', $email);
            // trim all values
            array_walk($email, function(&$val) {
                return $val = trim($val);
            });
            // remove empty elements
            $email = array_filter($email);
        }

        foreach ($email as $e) {
            if (!$this->validateHeaderFieldValue($e)) {
                throw new EmailValidationException(__('Recipient address can not contain carriage return or newlines.'));
            }
        }

        $this->_recipients = $email;
    }
96882
public function setEmailAddress($emailAddress)
    {
        if (!(is_string($emailAddress) &&
            filter_var($emailAddress, FILTER_VALIDATE_EMAIL))
        ) {
            throw new TypeException(
                '$emailAddress must be valid and of type string.'
            );
        }
        $this->email = $emailAddress;
    }
718471
public function for(string $email)
    {
        if (Invite::where('for', strtolower($email))->first()) {
            throw new DuplicateException('You cannot create more than 1 invite code for an email');
        }

        $this->email = $email;

        return $this;
    }
431656
public function setEmail($email = '')
    {
        $email = (string)$email;

        // According to the docs, emails should be lowercase: https://en.gravatar.com/site/implement/hash/
        $email = trim($email);
        $email = strtolower($email);

        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            throw new \InvalidArgumentException('Email should be a valid email address');
        }

        $this->email = md5($email);

        return $this;
    }
1299538
public function setBodyType($type)
    {
        if ($type == 'html' || $type == 'text' || $type = 'both') {
            $this->body_type = $type;
        } else {
            throw new Exception_TMail("Unsupported body type: $type");
        }

        return $this;
    }
28589
public function setEmail($email)
    {
        $email = is_null($email) ? '' : $email;
        parent::setEmail($email);
        $this->setUsername($email);

        return $this;
    }
771528
public function setEmail($email)
    {
        $email = (string) $email;

        if ($this->exists() && $this->email !== $email) {
            $this->updated['email'] = true;
        }

        $this->email = $email;

        return $this;
    }
405206
public function defaultMailer($message, string $email): void
    {
        $host = \preg_replace('#[^\w.-]+#', '', $_SERVER['HTTP_HOST'] ?? php_uname('n'));
        $parts = \str_replace(
            ["\r\n", "\n"],
            ["\n", PHP_EOL],
            [
                'headers' => \implode("\n", [
                        'From: ' . ($this->fromEmail ?: "noreply@$host"),
                        'X-Mailer: Tracy',
                        'Content-Type: text/plain; charset=UTF-8',
                        'Content-Transfer-Encoding: 8bit',
                    ]) . "\n",
                'subject' => "PHP: An error occurred on the server $host",
                'body' => Dumper::formatMessage($message) . "\n\nsource: " . Helpers::getSource(),
            ]
        );

        \mail($email, $parts['subject'], $parts['body'], $parts['headers']);
    }
466907
protected function addAddress(\Swift_Message $email, string $type, string $address)
    {
        $method = 'add'.$type;

        $parsed = AddressParser::parse($address);
        $email->$method($parsed['address'], $parsed['personal']);
    }
201638
public function setSender($email) {
    if (!$this->checkValidEmail($email)) {
      throw new \InvalidArgumentException(
          "Invalid sender: ". htmlspecialchars($email));
    }
    $this->message->setSender($email);
  }
891321
public function bcc(string $email, ?string $name = null)
  {
    $this->bcc[] = ['email' => $email, 'name' => $name];
    return $this;
  }
331924
public function setFrom($email, $name = null)
    {
        if ($email instanceof From) {
            $this->from = $email;
        } else {

            if (
                is_string($email) && filter_var($email, FILTER_VALIDATE_EMAIL)
            ) {
                $this->from = new From($email, $name);
            } else {
                throw new TypeException(
                    '$email must be valid and of type string.'
                );
            }

        }
        return;
    }