improve error message for not set smtp host

This commit is contained in:
Chronial committed 2014-04-11 10:11:18 +01:00
1 parent 85dc699afd
commit 45e0365931
1 file changed
+5
+5
View File
@@ -68,6 +68,11 @@ def send_email(success):
import smtplib import smtplib
from email.mime.text import MIMEText from email.mime.text import MIMEText
from email import charset from email import charset
if len(config["smtp"]["host"]) == 0:
logging.error("Failed to send email because smtp host is not set")
return
# use quoted-printable instead of the default base64 # use quoted-printable instead of the default base64
charset.add_charset("utf-8", charset.SHORTEST, charset.QP) charset.add_charset("utf-8", charset.SHORTEST, charset.QP)
if success: if success: