summaryrefslogtreecommitdiffstats
path: root/examples/imapresource/imapserverproxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/imapresource/imapserverproxy.cpp')
-rw-r--r--examples/imapresource/imapserverproxy.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/imapresource/imapserverproxy.cpp b/examples/imapresource/imapserverproxy.cpp
index 703caca..fbda02e 100644
--- a/examples/imapresource/imapserverproxy.cpp
+++ b/examples/imapresource/imapserverproxy.cpp
@@ -99,7 +99,11 @@ KAsync::Job<void> ImapServerProxy::login(const QString &username, const QString
99 loginJob->setUserName(username); 99 loginJob->setUserName(username);
100 loginJob->setPassword(password); 100 loginJob->setPassword(password);
101 loginJob->setAuthenticationMode(KIMAP::LoginJob::Plain); 101 loginJob->setAuthenticationMode(KIMAP::LoginJob::Plain);
102 loginJob->setEncryptionMode(KIMAP::LoginJob::EncryptionMode::AnySslVersion); 102 if (mSession->port() == 143) {
103 loginJob->setEncryptionMode(KIMAP::LoginJob::EncryptionMode::TlsV1);
104 } else {
105 loginJob->setEncryptionMode(KIMAP::LoginJob::EncryptionMode::AnySslVersion);
106 }
103 107
104 auto capabilitiesJob = new KIMAP::CapabilitiesJob(mSession); 108 auto capabilitiesJob = new KIMAP::CapabilitiesJob(mSession);
105 QObject::connect(capabilitiesJob, &KIMAP::CapabilitiesJob::capabilitiesReceived, [this](const QStringList &capabilities) { 109 QObject::connect(capabilitiesJob, &KIMAP::CapabilitiesJob::capabilitiesReceived, [this](const QStringList &capabilities) {