mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
catch SMTP exception if any - issue #311
This commit is contained in:
parent
3dd9f29938
commit
fb752e6936
|
@ -91,7 +91,11 @@ if CONTENT:
|
|||
attachment.add_header("Content-Disposition", "attachment", filename="test_case_%d_console_output.txt" % test_count)
|
||||
msg.attach(attachment)
|
||||
|
||||
try:
|
||||
s = smtplib.SMTP(host=SMTP_SERVER, port=SMTP_PORT, timeout=SMTP_TIMEOUT)
|
||||
#s.set_debuglevel(1)
|
||||
s.sendmail(FROM, TO, msg.as_string())
|
||||
s.quit()
|
||||
# Catch all for SMTP exceptions
|
||||
except smtplib.SMTPException, e:
|
||||
print "Failure to send email: %s" % str(e)
|
||||
|
|
Loading…
Reference in New Issue
Block a user