summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/smtpwrapper.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper/smtpwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index 845c71c..448a2e9 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -203,12 +203,13 @@ void SMTPwrapper::connect_server()
server = m_SmtpAccount->getServer();
if ( m_SmtpAccount->ConnectionType() == 3 ) {
ssl = true;
try_tls = false;
} else if (m_SmtpAccount->ConnectionType() == 2) {
force_tls = true;
+ try_tls = true;
} else if (m_SmtpAccount->ConnectionType() == 1) {
try_tls = true;
}
int result = 1;
port = m_SmtpAccount->getPort().toUInt();
@@ -242,21 +243,23 @@ void SMTPwrapper::connect_server()
result = 0;
qDebug("Error init SMTP connection ");
failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err));
}
}
if (result && try_tls) {
- qDebug("Smpt: Try tls ");
+ qDebug("Smpt: Try TLS... ");
err = start_smtp_tls();
if (err != MAILSMTP_NO_ERROR) {
try_tls = false;
- qDebug("no tls ");
+ qDebug("Smpt: No TLS possible ");
} else {
err = mailesmtp_ehlo(m_smtp);
if ( err != MAILSMTP_NO_ERROR )
result = 0;
+ else
+ qDebug("Smpt: Using TLS ");
}
}
//qDebug("mailesmtp_ehlo %d ",err );
if (!try_tls && force_tls) {
result = 0;
failuretext = i18n("Error init SMTP tls:%1").arg(mailsmtpError(err));