summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/imapwrapper.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/imapwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp12
1 files changed, 11 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
@@ -77,14 +77,24 @@ void IMAPwrapper::login()
77 user = account->getUser().latin1(); 77 user = account->getUser().latin1();
78 pass = account->getPassword().latin1(); 78 pass = account->getPassword().latin1();
79 } 79 }
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 );
88 } 98 }
89 99
90 if ( err != MAILIMAP_NO_ERROR && 100 if ( err != MAILIMAP_NO_ERROR &&