Check if an email is in the whitelist. If there's no whitelist,
        it's assumed it's not whitelisted.

def _is_whitelisted(self, email):
        """Check if an email is in the whitelist. If there's no whitelist,
        it's assumed it's not whitelisted."""

        return hasattr(settings, "SAFE_EMAIL_WHITELIST") and \
            any(re.match(m, email) for m in settings.SAFE_EMAIL_WHITELIST)