def extract_domain(email_address):
    """
    Given an email address, extract the domain name from it. This is done by finding the @ and
    then splicing the email address and returning everything found after the @. If no @ is found
    then the entire email address string is returned.

    :param email_address:
    :return:
    """
    email_address = email_address.lower()
    # figure out the domain from the email address
    try:
        return email_address[email_address.index(u'@') + 1:]
    except ValueError:
        # no @ found, just use the whole string
        return email_address