|
@@ -402,7 +402,11 @@ FROM subscriptions")
|
|
msg.attach(msgtext)
|
|
msg.attach(msgtext)
|
|
serverconnection = smtplib.SMTP()
|
|
serverconnection = smtplib.SMTP()
|
|
try:
|
|
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:
|
|
except smtplib.SMTPConnectError:
|
|
printf(sys.stderr, _("Could not connect to the smtp server, please"
|
|
printf(sys.stderr, _("Could not connect to the smtp server, please"
|
|
" check your settings!"), outputlevel="default",
|
|
" check your settings!"), outputlevel="default",
|