浏览代码

Set SMTP timeout

pull/40/head
父节点
当前提交
d5b155a348
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      src/app/views/utils.py

+ 1
- 1
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") 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" smtp_server = os.getenv("smtp_server", default="molde.idi.ntnu.no") + ":25"
return smtplib.SMTP(smtp_server, timeout=timeout) return smtplib.SMTP(smtp_server, timeout=timeout)




正在加载...
取消
保存