Fix sending email without login

This commit is contained in:
Sean Whalen
2018-03-05 17:16:06 -05:00
parent 614c8b68fb
commit 5043d34872
+1 -1
View File
@@ -1249,7 +1249,7 @@ def email_results(results, host, mail_from, mail_to, user=None,
server.starttls(context=ssl_context)
if user and password:
server.login(user, password)
server.sendmail(mail_from, mail_to, msg.as_string())
server.sendmail(mail_from, mail_to, msg.as_string())
except smtplib.SMTPException as error:
error = error.__str__().lstrip("b'").rstrip("'").rstrip(".")
raise SMTPError(error)