From d5b155a34883df70ee93ba9cb7661656cf0c04b1 Mon Sep 17 00:00:00 2001 From: Sindre Stephansen Date: Wed, 18 Mar 2020 22:34:56 +0100 Subject: [PATCH] Set SMTP timeout --- src/app/views/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/views/utils.py b/src/app/views/utils.py index 3969ca7..e055f9f 100755 --- a/src/app/views/utils.py +++ b/src/app/views/utils.py @@ -26,7 +26,7 @@ def sendmail(subject, message, to_name, to_email, from_name="Beelance", from_ema logging.exception("Exception when sending email") -def get_smtp(timeout=3000): +def get_smtp(timeout=2): smtp_server = os.getenv("smtp_server", default="molde.idi.ntnu.no") + ":25" return smtplib.SMTP(smtp_server, timeout=timeout)