author | harlekin <harlekin> | 2004-01-10 00:32:04 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-01-10 00:32:04 (UTC) |
commit | 76cf4990cb4171a747ac31e9832f4ee694ced2cc (patch) (side-by-side diff) | |
tree | ce97c1b6b6e9f832cc09a71fe3e8e87551bb01bd /noncore/net/mail/libmailwrapper | |
parent | 241fb3509f6b62efda3c89f5bf9cec0dfba86b43 (diff) | |
download | opie-76cf4990cb4171a747ac31e9832f4ee694ced2cc.zip opie-76cf4990cb4171a747ac31e9832f4ee694ced2cc.tar.gz opie-76cf4990cb4171a747ac31e9832f4ee694ced2cc.tar.bz2 |
new connection setting stuff for imap too
Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 36 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.cpp | 2 |
2 files changed, 25 insertions, 13 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 @@ -82,4 +82,14 @@ void IMAPwrapper::login() + + /* connect */ - if (account->getSSL()) { + + bool ssl = false; + + if ( account->ConnectionType() == 2 ) { + ssl = true; + } + + if ( ssl ) { + qDebug( "using ssl" ); err = mailimap_ssl_connect( m_imap, (char*)server, port ); @@ -371,3 +381,3 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) qDebug(da.toString()); -#endif +#endif } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { @@ -410,3 +420,3 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) } - + /* the range has to start at 1!!! not with 0!!!! */ @@ -497,5 +507,5 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> set = mailimap_set_new_single(mail.getNumber()); - + clist*id_list = 0; - + /* if path == empty then its a request for the whole rfc822 mail and generates @@ -512,3 +522,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> } - + section = mailimap_section_new(section_spec); @@ -516,5 +526,5 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> fetchType = mailimap_fetch_type_new_fetch_att(fetch_att); - + clist*result = 0; - + err = mailimap_fetch( m_imap, set, fetchType, &result ); @@ -522,3 +532,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> mailimap_fetch_type_free( fetchType ); - + if (err == MAILIMAP_NO_ERROR && (current=clist_begin(result)) ) { @@ -537,3 +547,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> } - } + } } else { @@ -666,3 +676,3 @@ void IMAPwrapper::fillSingleMsgPart(RecPart&target_part,mailimap_body_type_msg*w target_part.setLines(which->bd_lines); - fillBodyFields(target_part,which->bd_fields); + fillBodyFields(target_part,which->bd_fields); } @@ -670,3 +680,3 @@ void IMAPwrapper::fillSingleMsgPart(RecPart&target_part,mailimap_body_type_msg*w void IMAPwrapper::fillMultiPart(RecPart&target_part,mailimap_body_type_mpart*which) -{ +{ if (!which) return; @@ -682,3 +692,3 @@ void IMAPwrapper::fillMultiPart(RecPart&target_part,mailimap_body_type_mpart*whi } - } + } } 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 @@ -166,2 +166,3 @@ void IMAPaccount::read() if (port.isNull()) port="143"; + connectionType = conf->readNumEntry( "ConnectionType" ); ssl = conf->readBoolEntry( "SSL",false ); @@ -188,2 +189,3 @@ void IMAPaccount::save() conf->writeEntry( "SSL", ssl ); + conf->writeEntry( "ConnectionType", connectionType ); conf->writeEntry( "User", user ); |