Set email

@param boolean $email

@return Attribute

@throws \InvalidArgumentException
19237
public function setEmail($email)
    {
        if (!is_bool($email)) {
            throw new \InvalidArgumentException('The attribute email on the class Attribute has to be boolean (' . gettype($email) . ('object' === gettype($email) ? ' ' . get_class($email) : '') . ' given).');
        }

        $this->email = $email;

        return $this;
    }
1305067
public function setEmail($email, $defaultEmail = null)
    {
        if (!empty($email)) {
            $this->email = $email;
        } else if (!empty($defaultEmail)) {
            $this->email = $defaultEmail;
            if (substr($this->email, 0, 1) == '@') {
                $this->email = $this->getId() . $this->email;
            }
        } else {
            $this->email = '';
        }
    }
449315
public function getUserByEMail(string $email)
    {
        $retval = null;

        if (strlen($email) > 0) {
            $nb_user = CNabuUser::findByEMail($this, $email);
            if ($nb_user instanceof CNabuUser && $nb_user->validateCustomer($this)) {
                $nb_user->setCustomer($this);
                $retval = $nb_user;
            }
        }

        return $retval;
    }
1171548
public function setFromAddress($emailAddress)
    {
        if (filter_var($emailAddress, FILTER_VALIDATE_EMAIL) !== $emailAddress) {
            throw new \InvalidArgumentException('Invalid email address: '.$emailAddress);
        }
        $this->fromAddress = $emailAddress;
    }
267413
public function setEmail($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->email !== $v) {
            $this->email = $v;
            $this->modifiedColumns[] = UserPeer::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;
    }
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;
    }
1000423
protected function _validateEmail($email, $context)
    {
        if ($this->_emailPattern === null) {
            if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
                return;
            }
        } elseif (preg_match($this->_emailPattern, $email)) {
            return;
        }

        $context = ltrim($context, '_');
        if ($email == '') {
            throw new InvalidArgumentException(sprintf('The email set for "%s" is empty.', $context));
        }
        throw new InvalidArgumentException(sprintf('Invalid email set for "%s". You passed "%s".', $context, $email));
    }
1345853
public function setMail($mail)
    {
        if (!$this->validMail($mail)) {
            return false;
        }

        if ($this->setMailStatement === null) {
            $this->setMailStatement = $this->connection->prepare("UPDATE User SET mail = ? WHERE username = ?");
            $this->setMailStatement->bindParam(1, $this->mail);
            $this->setMailStatement->bindParam(2, $this->username);
        }
        $this->mail = $mail;
        $this->setMailStatement->execute();
        return true;
    }
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;
    }
388884
public function set_emails($emails)
        {
            if (!Arrays::is($emails)) {
                $emails = (array) $emails;
            }
            $this->domains = array();
            foreach ($emails as $email) {
                list($user, $domain) = $this->parse_email($email);
                if (!isset($this->domains[$domain])) {
                    $this->domains[$domain] = array();
                }
                $this->domains[$domain][] = $user;
            }
        }
1095212
public function setInverse($inverse)
    {
        if (!is_bool($inverse)) {
            throw new \InvalidArgumentException('The attribute inverse on the class Attribute has to be boolean (' . gettype($inverse) . ('object' === gettype($inverse) ? ' ' . get_class($inverse) : '') . ' given).');
        }

        $this->inverse = $inverse;

        return $this;
    }
1204141
public function setEmail($email)
    {
        $this->email = $email;
        $this->referenceId = null;
        $this->executed = false;
        return $this;
    }
144554
function SetFrom($email,$name="")
	{
		if ($this->DecodeEntities)
		{
			$email = $this->DecodeEntities($email);
			$name = $this->DecodeEntities($name);
		}

		$this->From = new Recipient($email,$name);
	}
883580
public function setEmailPassword($email, $password)
    {
        if (isset($this->apikey)) {
            throw new \Exception(
                "ApiKey already set."
            );
		}
		$this->emailPassword = $email.': '.$password;
		return $this;
    }
489775
public function setEmail($email)
    {
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            throw new InvalidParamException('Invalid email format: "' . $email . '"');
        } else {
            $this->email = $email;
        }

        return $this;
    }
414827
public function setTo($email)
    {
        if (is_string($email)) {
            $email = [ $email ];
        }

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

        $this->to = [];

        // 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->addTo($email);
        } else {
            foreach ($email as $recipient) {
                $this->addTo($recipient);
            }
        }

        return $this;
    }