Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 12 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.cpp | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 4b633ea..1c22c26 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -80,8 +80,18 @@ void IMAPwrapper::login() | |||
80 | 80 | ||
81 | m_imap = mailimap_new( 20, &imap_progress ); | 81 | m_imap = mailimap_new( 20, &imap_progress ); |
82 | 82 | ||
83 | |||
84 | |||
83 | /* connect */ | 85 | /* connect */ |
84 | if (account->getSSL()) { | 86 | |
87 | bool ssl = false; | ||
88 | |||
89 | if ( account->ConnectionType() == 2 ) { | ||
90 | ssl = true; | ||
91 | } | ||
92 | |||
93 | if ( ssl ) { | ||
94 | qDebug( "using ssl" ); | ||
85 | err = mailimap_ssl_connect( m_imap, (char*)server, port ); | 95 | err = mailimap_ssl_connect( m_imap, (char*)server, port ); |
86 | } else { | 96 | } else { |
87 | err = mailimap_socket_connect( m_imap, (char*)server, port ); | 97 | err = mailimap_socket_connect( m_imap, (char*)server, port ); |
diff --git a/noncore/net/mail/libmailwrapper/settings.cpp b/noncore/net/mail/libmailwrapper/settings.cpp index 7b6a58d..3279f39 100644 --- a/noncore/net/mail/libmailwrapper/settings.cpp +++ b/noncore/net/mail/libmailwrapper/settings.cpp | |||
@@ -164,6 +164,7 @@ void IMAPaccount::read() | |||
164 | if (server.isNull()) server=""; | 164 | if (server.isNull()) server=""; |
165 | port = conf->readEntry( "Port","" ); | 165 | port = conf->readEntry( "Port","" ); |
166 | if (port.isNull()) port="143"; | 166 | if (port.isNull()) port="143"; |
167 | connectionType = conf->readNumEntry( "ConnectionType" ); | ||
167 | ssl = conf->readBoolEntry( "SSL",false ); | 168 | ssl = conf->readBoolEntry( "SSL",false ); |
168 | user = conf->readEntry( "User","" ); | 169 | user = conf->readEntry( "User","" ); |
169 | if (user.isNull()) user = ""; | 170 | if (user.isNull()) user = ""; |
@@ -186,6 +187,7 @@ void IMAPaccount::save() | |||
186 | conf->writeEntry( "Server", server ); | 187 | conf->writeEntry( "Server", server ); |
187 | conf->writeEntry( "Port", port ); | 188 | conf->writeEntry( "Port", port ); |
188 | conf->writeEntry( "SSL", ssl ); | 189 | conf->writeEntry( "SSL", ssl ); |
190 | conf->writeEntry( "ConnectionType", connectionType ); | ||
189 | conf->writeEntry( "User", user ); | 191 | conf->writeEntry( "User", user ); |
190 | conf->writeEntryCrypt( "Password", password ); | 192 | conf->writeEntryCrypt( "Password", password ); |
191 | conf->writeEntry( "MailPrefix",prefix); | 193 | conf->writeEntry( "MailPrefix",prefix); |