Module: check_mk
Branch: master
Commit: e8da4c423712e3dd295ba5cb0d6f09a925450aa9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e8da4c423712e3…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Thu Jun 9 11:57:23 2016 +0200
mail notification: fixed access to invalid parameter in smtp-path
---
notifications/mail | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/notifications/mail b/notifications/mail
index 6ef6644..6030e77 100755
--- a/notifications/mail
+++ b/notifications/mail
@@ -489,14 +489,13 @@ def send_mail_smtp_impl(message, target, host, from_address,
context):
return self.last_code, self.last_repl
port = int(context['PARAMETER_SMTP_PORT'])
- timeout = int(context['PARAMETER_SMTP_TIMEOUT'])
encryption = context.get('PARAMETER_SMTP_ENCRYPTION', "NONE")
if encryption == "SSL_TLS":
- conn = smtplib.SMTP_SSL(host, port, from_address, timeout=timeout)
+ conn = smtplib.SMTP_SSL(host, port, from_address)
else:
- conn = smtplib.SMTP(host, port, from_address, timeout=timeout)
+ conn = smtplib.SMTP(host, port, from_address)
# evil hack: the smtplib doesn't allow access to the reply code/message
# in case of success. But we want it!