(email_address)
return False
This is a very rudimentary check to see that an email is formatted
        properly. It's not doing anything intelligent--like whether a TLD looks
        correct or that the domain name might be misspelled (gamil vs gmail).
        For the future, we might consider using something like Twilio's SendGrid.
        Ideally, any email validation should happen at the UI level rather
        than here, so that proper feedback can be given to the user.
        This is just a fail-safe so that we stop sending to foobar@gmail
        :param email_address:
        :return: boolean (True if email is poorly formatted)
This is a very rudimentary check to see that an email is formatted
        properly. It's not doing anything intelligent--like whether a TLD looks
        correct or that the domain name might be misspelled (gamil vs gmail).
        For the future, we might consider using something like Twilio's SendGrid.
        Ideally, any email validation should happen at the UI level rather
        than here, so that proper feedback can be given to the user.
        This is just a fail-safe so that we stop sending to foobar
This is a very rudimentary check to see that an email is formatted properly . It s not doing anything intelligent -- like whether a TLD looks correct or that the domain name might be misspelled ( gamil vs gmail ) . For the future we might consider using something like Twilio s SendGrid . Ideally any email validation should happen at the UI level rather than here so that proper feedback can be given to the user . This is just a fail - safe so that we stop sending to foobar
def is_bad_email_format(email_address):
        """
        This is a very rudimentary check to see that an email is formatted
        properly. It's not doing anything intelligent--like whether a TLD looks
        correct or that the domain name might be misspelled (gamil vs gmail).
        For the future, we might consider using something like Twilio's SendGrid.
        Ideally, any email validation should happen at the UI level rather
        than here, so that proper feedback can be given to the user.
        This is just a fail-safe so that we stop sending to foobar@gmail
        :param email_address:
        :return: boolean (True if email is poorly formatted)
        """
        try:
            if len(email_address.split('@')[1].split('.')) < 2:
                # if no TLD was present
                return True
        except IndexError:
            # if @ was missing
            return True
        return False
def is_bad_email_format ( email_address ) : try : if len ( email_address . split ( '@' ) [ 1 ] . split ( '.' ) ) < 2 : # if no TLD was present return True except IndexError : # if @ was missing return True return False