[FIX] ir.mail_server: server TLS setting overrides connect() parameter

Cfr 00bd7274c4
This commit is contained in:
Olivier Dony
2017-03-07 16:47:23 +01:00
parent 00bd7274c4
commit 7b59ce18be
+1 -1
View File
@@ -242,7 +242,7 @@ class IrMailServer(models.Model):
else:
connection = smtplib.SMTP(smtp_server, smtp_port)
connection.set_debuglevel(smtp_debug)
if encryption == 'starttls':
if smtp_encryption == 'starttls':
# starttls() will perform ehlo() if needed first
# and will discard the previous list of services
# after successfully performing STARTTLS command,