summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/smtpwrapper.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper/smtpwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index 5096f67..872a460 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -184,37 +184,39 @@ int SMTPwrapper::start_smtp_tls()
} else {
return MAILSMTP_ERROR_IN_PROCESSING;
}
return err;
}
void SMTPwrapper::connect_server()
{
QString server, user, pass;
bool ssl;
uint16_t port;
ssl = false;
- bool try_tls = true;
+ bool try_tls = false;
bool force_tls=false;
QString failuretext = "";
if (m_smtp || !m_SmtpAccount) {
return;
}
server = m_SmtpAccount->getServer();
- if ( m_SmtpAccount->ConnectionType() == 2 ) {
+ if ( m_SmtpAccount->ConnectionType() == 3 ) {
ssl = true;
try_tls = false;
- } else if (m_SmtpAccount->ConnectionType() == 1) {
+ } else if (m_SmtpAccount->ConnectionType() == 2) {
force_tls = true;
+ } else if (m_SmtpAccount->ConnectionType() == 1) {
+ try_tls = true;
}
int result = 1;
port = m_SmtpAccount->getPort().toUInt();
m_smtp = mailsmtp_new( 20, &progress );
if ( m_smtp == NULL ) {
/* no failure message cause this happens when problems with memory - than we
we can not display any messagebox */
return;
}
int err = MAILSMTP_NO_ERROR;