Indicate whether email settings are defined.

@return true if undefined, false otherwise.
436556
public boolean isUndefined() {
        return StringUtils.isBlank(text) || StringUtils.isBlank(from) || StringUtils.isBlank(subject);
    }
150094
static public boolean isValidEmail(String email) {
    return email != null && email.trim().length() > 0 && email.indexOf("@") > 0;
  }
1192998
function getEmailIfValid(emailToVerify) {
  if (emailToVerify) {
    const email = emailToVerify.trim();
    if (emailRegex.test(email)) {
      return email;
    } else {
      return undefined;
    }
  }
}
535011
public boolean isTrue(Configuration configuration) {
        for (int i = 0; i < this.variables.size(); ++i) {
            Variable variable = this.variables.get(i);
            if (configuration.valueAt(variable.getIndex()) == 1 && !this.negatedFlags.get(i))
                return true;
            if (configuration.valueAt(variable.getIndex()) == 0 && this.negatedFlags.get(i))
                return true;
        }

        return false;
    }
1101943
public static function is_enabled() {
        global $CFG;

        // Check whether Inbound Message is enabled at all.
        if (!isset($CFG->messageinbound_enabled) || !$CFG->messageinbound_enabled) {
            return false;
        }

        // Check whether the outgoing mailbox and domain are configured properly.
        if (!isset($CFG->messageinbound_mailbox) || empty($CFG->messageinbound_mailbox)) {
            return false;
        }

        if (!isset($CFG->messageinbound_domain) || empty($CFG->messageinbound_domain)) {
            return false;
        }

        return true;
    }
437609
function (fieldDefinition, fieldName) {
    const fieldType = propertyHelper.getFieldType(fieldDefinition);

    let checks;
    if (fieldType === 'string' || fieldType === 'email') {
      // first create the string checks
      checks = createChecksString(fieldDefinition, fieldName);
    }

    if (fieldType === 'email') {
      // for email an additional check will be added
      checks.push(createCheckEmail(fieldDefinition, fieldName));
    }

    // This must be the last one, because the email check will delete the value from the content
    if (fieldType === 'string' || fieldType === 'email') {
      const defaultValueCheck = createCheckDefaultValue(fieldDefinition, fieldName);
      if (defaultValueCheck !== undefined) {
        checks.push(defaultValueCheck);
      }
    }
    return checks;
  }
413339
def is_defined(self, objtxt, force_import=False):
        """"""
        return isdefined(objtxt, force_import=force_import,
                         namespace=self.locals)
1092757
public function isEmailTaken($email)
    {
        $query = "SELECT count(*) FROM {$this->config->table_users} WHERE email = :email";
        $query_prepared = $this->dbh->prepare($query);
        $query_prepared->execute(['email' => $email]);

        if ($query_prepared->fetchColumn() == 0) {
            return false;
        }

        return true;
    }
1034822
protected function validateSettings()
    {
        $this->setSubmitted('settings');

        foreach (array('tags', 'protocols') as $field) {
            $string = str_replace(' ', '', $this->getSubmitted($field));
            $this->setSubmitted($field, array_filter(explode(',', $string)));
        }

        return !$this->hasErrors();
    }
686966
public function isSendmail()
    {
        $ini_sendmail_path = ini_get('sendmail_path');

        if (false === stripos($ini_sendmail_path, 'sendmail')) {
            $this->Sendmail = '/usr/sbin/sendmail';
        } else {
            $this->Sendmail = $ini_sendmail_path;
        }
        $this->Mailer = 'sendmail';
    }
1367666
public boolean has() {
        return attributeHolder.getAttribute(getMessagesKey(), UserMessages.class).filter(messages -> {
            return !messages.isEmpty();
        }).isPresent();
    }
515606
public static function isBlacklisted($email) {
        $parts = explode("@", $email);
        $domain = end($parts);

        foreach (self::allDomainSuffixes($domain) as $domainSuffix) {
            if (in_array($domainSuffix, self::$blacklist)) {
                return true;
            }
        }

        return false;
    }
447010
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case APP:
      return isSetApp();
    case NUM_MESSAGES:
      return isSetNumMessages();
    case COMPRESSION:
      return isSetCompression();
    case CRC:
      return isSetCrc();
    case MESSAGES:
      return isSetMessages();
    }
    throw new IllegalStateException();
  }
177233
public static function isEmail($email) {
        if (!is_string($email) || strlen($email) > 255)
            return false;
        if (Tools::phpVersionCompareTo('5.3.3') >= 0)
            return (boolean) filter_var($email, FILTER_VALIDATE_EMAIL);
        else
            return (boolean) preg_match('`^(?!\.)[.\w!#$%&\'*+/=?^_\`{|}~-]+@(?!-)[\w-]+\.\w+$`i', $email);
    }
1054273
public boolean hasUser(String userId) {
        String normalized = normalizerUserName(userId);
        return loginToUser.containsKey(normalized) || emailToUser.containsKey(normalized);
    }
239307
public function isSendmail()
    {
        $ini_sendmail_path = ini_get('sendmail_path');

        if (!stristr($ini_sendmail_path, 'sendmail')) {
            $this->Sendmail = '/usr/sbin/sendmail';
        } else {
            $this->Sendmail = $ini_sendmail_path;
        }
        $this->Mailer = 'sendmail';
    }
665027
def check_user_settings(self, medium='email'):
        
        # custom notifications are always sent
        if self.type == 'custom':
            return True

        try:
            user_settings = getattr(self.to_user, '%s_notification_settings' % medium)
        except ObjectDoesNotExist:
            # user has no settings specified
            # TODO: it would be better to create the settings with default values
            return False

        user_setting_type = getattr(user_settings.__class__, self.type).user_setting_type

        if user_setting_type == 'boolean':
            return getattr(user_settings, self.type, True)
        elif user_setting_type == 'distance':
            value = getattr(user_settings, self.type, 0)
            # enabled for all related objects
            if value is 0:
                return True
            # disabled for all related objects
            elif value < 0:
                return False
            # enabled for related objects comprised in specified distance range in km
            else:
                Model = self.related_object.__class__
                geo_field = getattr(user_settings.__class__, self.type).geo_field
                geo_value = getattr(self.related_object, geo_field)
                km = value * 1000
                queryset = Model.objects.filter(**{
                    "user_id": self.to_user_id,
                    geo_field + "__distance_lte": (geo_value, km)
                })
                # if user has related object in a distance range less than or equal to
                # his prefered range (specified in number of km), return True and send the notification
                return queryset.count() >= 1