author | harlekin <harlekin> | 2003-12-10 11:44:00 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-10 11:44:00 (UTC) |
commit | 9f974b45ef133d807f8441d84cfebe9b51865499 (patch) (unidiff) | |
tree | 85b5f286516f79d425e7769044e0a7b20848d529 /noncore/net | |
parent | 434db5193380185cc1b6347ff5882ad558f401d4 (diff) | |
download | opie-9f974b45ef133d807f8441d84cfebe9b51865499.zip opie-9f974b45ef133d807f8441d84cfebe9b51865499.tar.gz opie-9f974b45ef133d807f8441d84cfebe9b51865499.tar.bz2 |
added ssl connection support for pop3
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.cpp | 11 | ||||
-rw-r--r-- | noncore/net/mail/pop3wrapper.cpp | 11 |
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 | |||
@@ -25,7 +25,7 @@ void POP3wrapper::listMessages( QList<RecMail> &target ) | |||
25 | char *header; | 25 | char *header; |
26 | size_t length; | 26 | size_t length; |
27 | carray *messages; | 27 | carray *messages; |
28 | 28 | ||
29 | login(); | 29 | login(); |
30 | mailpop3_list( m_pop3, &messages ); | 30 | mailpop3_list( m_pop3, &messages ); |
31 | 31 | ||
@@ -73,9 +73,14 @@ void POP3wrapper::login() | |||
73 | m_pop3 = mailpop3_new( 200, &pop3_progress ); | 73 | m_pop3 = mailpop3_new( 200, &pop3_progress ); |
74 | 74 | ||
75 | // connect | 75 | // connect |
76 | err = mailpop3_socket_connect( m_pop3, (char *) server, port ); | 76 | if (account->getSSL()) { |
77 | err = mailpop3_ssl_connect( m_pop3, (char*)server, port ); | ||
78 | } else { | ||
79 | err = mailpop3_socket_connect( m_pop3, (char*)server, port ); | ||
80 | } | ||
81 | |||
77 | if ( err != MAILPOP3_NO_ERROR ) { | 82 | if ( err != MAILPOP3_NO_ERROR ) { |
78 | qDebug( "pop3: error connecting to %s\n reason: %s", server, | 83 | qDebug( "pop3: error connecting to %s\n reason: %s", server, |
79 | m_pop3->response ); | 84 | m_pop3->response ); |
80 | mailpop3_free( m_pop3 ); | 85 | mailpop3_free( m_pop3 ); |
81 | m_pop3 = NULL; | 86 | m_pop3 = NULL; |
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 | |||
@@ -25,7 +25,7 @@ void POP3wrapper::listMessages( QList<RecMail> &target ) | |||
25 | char *header; | 25 | char *header; |
26 | size_t length; | 26 | size_t length; |
27 | carray *messages; | 27 | carray *messages; |
28 | 28 | ||
29 | login(); | 29 | login(); |
30 | mailpop3_list( m_pop3, &messages ); | 30 | mailpop3_list( m_pop3, &messages ); |
31 | 31 | ||
@@ -73,9 +73,14 @@ void POP3wrapper::login() | |||
73 | m_pop3 = mailpop3_new( 200, &pop3_progress ); | 73 | m_pop3 = mailpop3_new( 200, &pop3_progress ); |
74 | 74 | ||
75 | // connect | 75 | // connect |
76 | err = mailpop3_socket_connect( m_pop3, (char *) server, port ); | 76 | if (account->getSSL()) { |
77 | err = mailpop3_ssl_connect( m_pop3, (char*)server, port ); | ||
78 | } else { | ||
79 | err = mailpop3_socket_connect( m_pop3, (char*)server, port ); | ||
80 | } | ||
81 | |||
77 | if ( err != MAILPOP3_NO_ERROR ) { | 82 | if ( err != MAILPOP3_NO_ERROR ) { |
78 | qDebug( "pop3: error connecting to %s\n reason: %s", server, | 83 | qDebug( "pop3: error connecting to %s\n reason: %s", server, |
79 | m_pop3->response ); | 84 | m_pop3->response ); |
80 | mailpop3_free( m_pop3 ); | 85 | mailpop3_free( m_pop3 ); |
81 | m_pop3 = NULL; | 86 | m_pop3 = NULL; |