def validate_email_with_regex(email_address):
    if not re.match(VALID_ADDRESS_REGEXP, email_address):
        emsg = 'Emailaddress "{}" is not valid according to RFC 2822 standards'.format(
            email_address)
        raise YagInvalidEmailAddress(emsg)
Note that this will only filter out syntax mistakes in emailaddresses.
dataset/ETHPy150Open kootenpv/yagmail/yagmail/validate.py/validate_email_with_regex