Don't try TLS with SSL connections

This commit is contained in:
Guillaume Ayoub 2013-05-01 20:24:41 +02:00
parent 0f0bddedc9
commit 45c1647a92

View File

@ -58,6 +58,7 @@ def is_authenticated(user, password):
server_is_local = (IMAP_SERVER == "localhost") server_is_local = (IMAP_SERVER == "localhost")
if not connection_is_secure:
try: try:
connection.starttls() connection.starttls()
log.LOGGER.debug("IMAP server connection changed to TLS.") log.LOGGER.debug("IMAP server connection changed to TLS.")