summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/pop3wrapper.cpp11
-rw-r--r--noncore/net/mail/pop3wrapper.cpp11
2 files changed, 16 insertions, 6 deletions
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
index 6decb6a..1538d50 100644
--- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
@@ -27,3 +27,3 @@ void POP3wrapper::listMessages( QList<RecMail> &target )
carray *messages;
-
+
login();
@@ -75,5 +75,10 @@ void POP3wrapper::login()
// connect
- err = mailpop3_socket_connect( m_pop3, (char *) server, port );
+ if (account->getSSL()) {
+ err = mailpop3_ssl_connect( m_pop3, (char*)server, port );
+ } else {
+ err = mailpop3_socket_connect( m_pop3, (char*)server, port );
+ }
+
if ( err != MAILPOP3_NO_ERROR ) {
- qDebug( "pop3: error connecting to %s\n reason: %s", server,
+ qDebug( "pop3: error connecting to %s\n reason: %s", server,
m_pop3->response );
diff --git a/noncore/net/mail/pop3wrapper.cpp b/noncore/net/mail/pop3wrapper.cpp
index 6decb6a..1538d50 100644
--- a/noncore/net/mail/pop3wrapper.cpp
+++ b/noncore/net/mail/pop3wrapper.cpp
@@ -27,3 +27,3 @@ void POP3wrapper::listMessages( QList<RecMail> &target )
carray *messages;
-
+
login();
@@ -75,5 +75,10 @@ void POP3wrapper::login()
// connect
- err = mailpop3_socket_connect( m_pop3, (char *) server, port );
+ if (account->getSSL()) {
+ err = mailpop3_ssl_connect( m_pop3, (char*)server, port );
+ } else {
+ err = mailpop3_socket_connect( m_pop3, (char*)server, port );
+ }
+
if ( err != MAILPOP3_NO_ERROR ) {
- qDebug( "pop3: error connecting to %s\n reason: %s", server,
+ qDebug( "pop3: error connecting to %s\n reason: %s", server,
m_pop3->response );