Method to perform the mail verification process.

    Arguments
    ---------
        emails: List of emails to verify.
        regExpPattern: Pattern that should match.

    Returns
    -------
        list: A list containing the results that match.
978844
def verifyEmails(emails=[], regExpPattern="^.+$"):
    
    emailsMatched = set()

    for i, e in enumerate(emails):
        if re.match(regExpPattern, e):
            emailsMatched.add(e)

    print(regExpPattern)

    return list(emailsMatched)
845418
def _extract_email(gh):
    """"""
    return next(
        (x.email for x in gh.emails() if x.verified and x.primary), None)
228534
def email_verifier(self, email, raw=False):
        
        params = {'email': email, 'api_key': self.api_key}

        endpoint = self.base_endpoint.format('email-verifier')

        return self._query_hunter(endpoint, params, raw=raw)
564243
def _check_email_match(self, user, email):
        
        if user.email != email:
            # The passed email address doesn't match this username's email address.
            # Assume a problem and fail.
            raise CommandError(
                _(
                    'Skipping user "{}" because the specified and existing email '
                    'addresses do not match.'
                ).format(user.username)
            )
1296941
def get_user_by_email(self, email):
        
        results = self.get_users(filter='email eq "%s"' % (email))
        if results['totalResults'] == 0:
            logging.warning("Found no matches for given email.")
            return
        elif results['totalResults'] > 1:
            logging.warning("Found %s matches for email %s" %
                (results['totalResults'], email))

        return results['resources'][0]
542911
def is_email_verified(self, request, email):
        
        ret = False
        verified_email = request.session.get('account_verified_email')
        if verified_email:
            ret = verified_email.lower() == email.lower()
        return ret
381899
def get_valid_user_by_email(email):
    
    user = get_user(email)
    if user:
        if user.valid is False:
            return Err("user not valid")
        return Ok(user)
    return Err("user not exists")
589722
private static boolean isEmail(String account) {

        if (TextUtils.isEmpty(account)) {
            return false;
        }

        final Pattern emailPattern = Patterns.EMAIL_ADDRESS;
        final Matcher matcher = emailPattern.matcher(account);
        return matcher.matches();
    }
156553
def delete_matching_path(self):
        
        logger.info(
            "Deleting all mails with file path matching the {} regexp..."
            "".format(self.conf.regexp.pattern))
        # Select candidates for deletion.
        candidates = [
            mail for mail in self.pool
            if re.search(self.conf.regexp, mail.path)]
        if len(candidates) == self.size:
            logger.warning(
                "Skip deletion: all {} mails matches the rexexp.".format(
                    self.size))
            return
        logger.info(
            "{} candidates found for deletion.".format(len(candidates)))
        for mail in candidates:
            self.delete(mail)
1098265
def validate_email():
    
    user_regex = re.compile(
        r"(^[-!#$%&'*+/=?^`{}|~\w]+(\.[-!#$%&'*+/=?^`{}|~\w]+)*$"
        r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]'
        r'|\\[\001-\011\013\014\016-\177])*"$)', re.IGNORECASE | re.UNICODE)

    domain_regex = re.compile(
        r'(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+'
        r'(?:[A-Z]{2,6}|[A-Z0-9-]{2,})$'
        r'|^\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)'
        r'(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE | re.UNICODE)

    domain_whitelist = ('localhost',)

    def email_validator(field, data):
        if field.value is None:
            return

        value = str(field.value)

        if '@' not in value:
            raise ValidationError('email')

        user_part, domain_part = value.rsplit('@', 1)

        if not user_regex.match(user_part):
            raise ValidationError('email')

        if domain_part in domain_whitelist:
            return

        if not domain_regex.match(domain_part):
            raise ValidationError('email')

    return email_validator
365295
def get_emails(self, limit=100, offset=0, conditions={}):
        
        url = self.EMAILS_URL + "?limit=%s&offset=%s" % (limit, offset)

        for key, value in conditions.items():
            if key is 'ids':
                value = ",".join(value)

            url += '&%s=%s' % (key, value)

        connection = Connection(self.token)
        connection.set_url(self.production, url)

        return connection.get_request()
1335395
def CheckEmail(self, email, checkTypo=False):
        ''''''
        contents = email.split('@')
        if len(contents) == 2:
            if contents[1] in self.valid:
                return True
        return False
879173
public ArrayList<User> lookupUsersByEmail (String email)
        throws PersistenceException
    {
        return loadAll(_utable, "where email = " + JDBCUtil.escape(email));
    }
1197562
def EMAIL_VERIFICATION(self):
        
        ret = self._setting("EMAIL_VERIFICATION",
                            self.EmailVerificationMethod.OPTIONAL)
        # Deal with legacy (boolean based) setting
        if ret is True:
            ret = self.EmailVerificationMethod.MANDATORY
        elif ret is False:
            ret = self.EmailVerificationMethod.OPTIONAL
        return ret
1211949
def clean_text(self, email, **kwargs):
        
        if not self.EMAIL_REGEX.match(email):
            return None
        email = strip_quotes(email)
        mailbox, domain = email.rsplit('@', 1)
        domain = self.domains.clean(domain, **kwargs)
        if domain is None or mailbox is None:
            return
        return '@'.join((mailbox, domain))
1326535
def verify_pattern(pattern):
    

    regex = re.compile("^!?[a-zA-Z]+$|[*]{1,2}$")

    def __verify_pattern__(__pattern__):
        if not __pattern__:
            return False
        elif __pattern__[0] == "!":
            return __verify_pattern__(__pattern__[1:])
        elif __pattern__[0] == "[" and __pattern__[-1] == "]":
            return all(__verify_pattern__(p) for p in __pattern__[1:-1].split(","))
        else:
            return regex.match(__pattern__)
    return all(__verify_pattern__(p) for p in pattern.split("/"))
21938
def weCanCheckTheseDomains(email):
    
    # Known platform not to be working...
    notWorking = [
        "@aol.com",
        "@bk.ru",
        "@breakthru.com",
        "@gmx.",
        "@hotmail.co",
        "@inbox.com",
        "@latinmail.com",
        "@libero.it",
        "@mail.ru",
        "@mail2tor.com",
        "@outlook.com",
        "@rambler.ru",
        "@rocketmail.com",
        "@starmedia.com",
        "@ukr.net"
        "@yahoo.",
        "@ymail."
    ]

    #notWorking = []
    for n in notWorking:
        if n in email:
            print("\t[*] Verification of '{}' aborted. Details:\n\t\t{}".format(general.warning(email), "This domain CANNOT be verified using mailfy."))
            return False

    emailDomains = EMAIL_DOMAINS
    safe = False

    for e in EMAIL_DOMAINS:
        if e in email:
            safe =  True

    if not safe:
        print("\t[*] Verification of '{}' aborted. Details:\n\t\t{}".format(general.warning(email), "This domain CANNOT be verified using mailfy."))
        return False
    return True