|
@@ -402,7 +402,11 @@ FROM subscriptions")
|
|
|
msg.attach(msgtext)
|
|
|
serverconnection = smtplib.SMTP()
|
|
|
try:
|
|
|
- serverconnection.connect(conf.values["mailhost"], conf.values["smtpport"])
|
|
|
+ if sys.version_info >= (3, 0):
|
|
|
+ serverconnection.connect(conf.values["mailhost"], conf.values["smtpport"])
|
|
|
+ else:
|
|
|
+ serverconnection.connect(str(conf.values["mailhost"]),
|
|
|
+ str(conf.values["smtpport"]))
|
|
|
except smtplib.SMTPConnectError:
|
|
|
printf(sys.stderr, _("Could not connect to the smtp server, please"
|
|
|
" check your settings!"), outputlevel="default",
|