Determine whether user can register with this email address.

@since 2.0.0
@access public
@param string $Email Email address to be checked.
544401
public function EmailAvailable($Email = '') {
		$this->_DeliveryType = DELIVERY_TYPE_BOOL;
      $Available = TRUE;

      if (C('Garden.Registration.EmailUnique', TRUE) && $Email != '') {
         $UserModel = Gdn::UserModel();
         if ($UserModel->GetByEmail($Email))
            $Available = FALSE;
      }
      if (!$Available)
         $this->Form->AddError(sprintf(T('%s unavailable'), T('Email')));
         
      $this->Render();
	}
1278396
public function is_valid_login_domain($email) {
        if (empty($this->get('alloweddomains'))) {
            return true;
        }

        $validdomains = explode(',', $this->get('alloweddomains'));

        $parts = explode('@', $email, 2);
        $emaildomain = '';
        if (count($parts) > 1) {
            $emaildomain = $parts[1];
        }

        return \core\ip_utils::is_domain_in_allowed_list($emaildomain, $validdomains);
    }
1071313
public function existsByEmail ($email)
    {
        $entity = $this->er->findOneBy(array('email' => $email));

        if (NULL == $entity) {
            return false;
        } else {
            return true;
        }
    }
567383
public function isValid($email)
    {
        // Does it look like an email address?
        if (! $this->isEmail($email)) {
            return false;
        }

        // Is is an example domain?
        if ($this->isExample($email)) {
            return false;
        }

        // Is is a it disposable?
        if ($this->isDisposable($email)) {
            return false;
        }

        // Is it role based?
        if ($this->isRole($email)) {
            return false;
        }

        // Does it have an MX record?
        if (! $this->hasMx($email)) {
            return false;
        }

        return true;
    }
1333738
public function isDisposable($email)
    {
        if (! $this->isEmail($email)) {
            return null;
        }

        $hostname = $this->hostnameFromEmail($email);

        if ($hostname) {
            // Load disposable domains
            if (is_null($this->disposable)) {
                $data = new \EmailData\Data();
                $file = $data->getPathToDataFile('php');
                $this->disposable = include($file);
            }

            // Search array for hostname
            if (in_array($hostname, $this->disposable)) {
                return true;
            }

            return false;
        }

        return null;
    }
699800
public function set_sender($email)
        {
            $parts = $this->parse_email($email);
            $this->from_user = $parts[0];
            $this->from_domain = $parts[1];
        }
201638
public function setSender($email) {
    if (!$this->checkValidEmail($email)) {
      throw new \InvalidArgumentException(
          "Invalid sender: ". htmlspecialchars($email));
    }
    $this->message->setSender($email);
  }
405487
public function email($email = null) {
		$this->out('Email:');
		while (empty($email) || !Validation::email($email)) {
			$email = $this->in('New email address (must have a valid form at least)');
		}

		/** @var \App\Model\Table\UsersTable $Users */
		$Users = TableRegistry::get(CLASS_USERS);
		$this->Users = $Users;
		if (!$this->Users->hasField('email')) {
			$this->abort(CLASS_USERS . ' table doesnt have an email field!');
		}

		$this->hr();
		$this->out('Resetting...');

		if (empty($this->params['dry-run'])) {
			$count = $this->Users->updateAll(['email' => $email . ''], ['email !=' => $email]);
		} else {
			$count = $this->Users->find('all', ['conditions' => [CLASS_USERS . '.email !=' => $email]])->count();
		}
		$this->out($count . ' emails resetted - DONE');
	}
354682
public static function email($email)
    {
        $email = Str::trim($email);
        $cleaned = filter_var($email, FILTER_VALIDATE_EMAIL);

        if (Email::isValid($cleaned)) {
            return $cleaned;
        }

        return false;
    }
48239
public function filterEmail($email)
    {
        foreach ($this->filters as $filter) {
            $shouldKeepEmail = $filter->checkEmail($email);
            if (!$shouldKeepEmail) {
                return true;
            }
        }

        return false;
    }
377645
protected function validateEmail($email) {
        $state['error'] = true;

        if (strlen($email) < (int)$this->config->verify_email_min_length ) {
            $state['message'] = $this->__lang("email_short", (int)$this->config->verify_email_min_length);

            return $state;
        } elseif (strlen($email) > (int)$this->config->verify_email_max_length ) {
            $state['message'] = $this->__lang("email_long", (int)$this->config->verify_email_max_length);

            return $state;
        } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            $state['message'] = $this->__lang("email_invalid", $email);

            return $state;
        }
        
        if ((int)$this->config->verify_email_use_banlist && $this->isEmailBanned($email)) {
            $this->addAttempt();
            $state['message'] = $this->__lang("email_banned");

            return $state;
        }

        $state['error'] = false;

        return $state;
    }
676290
public function setEmail($email)
    {
        if (!is_string($email)) {
            $email = strval($email);
        }

        $this->email = $email;
    }
529776
public function isValid($email)
    {
        if (false === $email = filter_var($email, FILTER_VALIDATE_EMAIL)) {
            return false;
        }

        try {
            list($local, $domain) = Utilities::parseEmailAddress($email);
        } catch (InvalidEmailException $e) {
            return false;
        }

        return !$this->adapter->isThrowawayDomain($domain);
    }
826951
public function isAdmin(?string $email = null): bool
    {
        if ($email === null) {
            return false;
        }
        return in_array($email, $this->getConfig()['admin']);
    }
596895
public function validateEmail($email)
    {
        if (empty($email)) {
            return false;
        }

        $validationViolationList = $this
            ->validator
            ->validate($email, new Email());

        return $validationViolationList->count() === 0;
    }
576048
public function thereIsAUserWithTheEmail($email)
    {
        $users = $this->getRepository()->getUserService()->loadUsersByEmail($email);

        Assertion::assertGreaterThan(0, count($users), "No user was found with the email '$email'");
        Assertion::assertInstanceOf('eZ\Publish\API\Repository\Values\User\User', $users[0]);
    }
377892
public static function isMail($email)
    {
        $parts = explode('@', $email);

        if (!is_string($email) || count($parts) != 2) {
            return false;
        }

        return (bool) filter_var($email, FILTER_VALIDATE_EMAIL);
    }