mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-05-02 02:02:31 +00:00
Fix SMTP AUTH extension not supported by server error on some SMTP servers
Issue #12
This commit is contained in:
@@ -9,6 +9,8 @@ GeoIP DB to avoid being blocked by security proxies
|
||||
- Add alignment booleans to JSON output
|
||||
- Fix `.msg` parsing CLI exception when `msgconvert` is not found in the
|
||||
system path
|
||||
- Fix `SMTP AUTH extension not supported by server` error on some SMTP servers
|
||||
(#12)
|
||||
|
||||
3.9.7
|
||||
-----
|
||||
|
||||
@@ -1438,9 +1438,11 @@ def email_results(results, host, mail_from, mail_to, port=0, starttls=True,
|
||||
ssl_context = ssl.create_default_context()
|
||||
if use_ssl:
|
||||
server = smtplib.SMTP_SSL(host, port=port, context=ssl_context)
|
||||
server.connect(host, port)
|
||||
server.helo()
|
||||
else:
|
||||
server = smtplib.SMTP(host, port=port)
|
||||
server.connect(host, port)
|
||||
server.ehlo()
|
||||
if starttls:
|
||||
server.starttls(context=ssl_context)
|
||||
|
||||
Reference in New Issue
Block a user