1
0
Fork 0
mirror of https://github.com/fastogt/pyfastogt synced 2025-03-09 23:38:55 +00:00

Validate email mx

This commit is contained in:
topilski 2018-02-20 09:02:54 +03:00
parent 938821bc92
commit 1405506db2

View file

@ -7,6 +7,7 @@ import re
import shutil
import subprocess
import tarfile
from validate_email import validate_email
from urllib.request import urlopen
@ -34,10 +35,7 @@ class CompileInfo(object):
def is_valid_email(email: str) -> bool:
if not re.match('[^@]+@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', email):
return False
return True
return validate_email(email, check_mx=True)
def is_role_based_email(email: str) -> bool: