Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions validate_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def validate_email(email, check_mx=False, verify=False, debug=False, smtp_timeou
smtp.quit()
except smtplib.SMTPServerDisconnected: # Server not permits verify user
if debug:
logger.debug(u'%s disconected.', mx[1])
logger.debug(u'%s disconnected.', mx[1])
except smtplib.SMTPConnectError:
if debug:
logger.debug(u'Unable to connect to %s.', mx[1])
Expand All @@ -182,16 +182,10 @@ def validate_email(email, check_mx=False, verify=False, debug=False, smtp_timeou
email = raw_input('Enter email for validation: ')

mx = raw_input('Validate MX record? [yN] ')
if mx.strip().lower() == 'y':
mx = True
else:
mx = False
mx = mx.strip().lower() == 'y'

validate = raw_input('Try to contact server for address validation? [yN] ')
if validate.strip().lower() == 'y':
validate = True
else:
validate = False
validate = validate.strip().lower() == 'y'

logging.basicConfig()

Expand Down