Skip to content

Instantly share code, notes, and snippets.

@koolquark
Created June 10, 2018 02:23
Show Gist options
  • Save koolquark/f97e42cb61267148c69b36a41d7d1259 to your computer and use it in GitHub Desktop.
Save koolquark/f97e42cb61267148c69b36a41d7d1259 to your computer and use it in GitHub Desktop.
Validate Email ID using validate_email
# Check Email ID Validity
from validate_email import validate_email
import sys
basename = sys.argv[1]
available = []
for email_id in [ basename + '@gmail.com' , basename + '[email protected]']:
# print("Verifying Email ID : " + email_id)
if len(email_id) > 15:
is_valid = validate_email(email_id,verify=True)
if not is_valid:
# print("Email ID: " + email_id + " is valid");
available.append("gmail : " + email_id)
for v in available:
print(v)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment