Skip to content

Commit 41a14e1

Browse files
Work around a bug in smtp lib
Fixes syrusakbary#50
1 parent 8439d94 commit 41a14e1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

validate_email/mx_check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ def _smtp_converse(
112112
if debug:
113113
LOGGER.debug(msg=f'Trying {mx_record} ...')
114114
with SMTP(timeout=smtp_timeout) as smtp:
115+
smtp._host = mx_record # Workaround for bug in smtplib
115116
smtp.set_debuglevel(debuglevel=2 if debug else False)
116117
code, message = smtp.connect(host=mx_record)
117118
if code >= 400:

0 commit comments

Comments
 (0)