Diffstat (limited to 'noncore/net/mail/libmailwrapper/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 36 |
1 files changed, 23 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() | |||
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 ); |
@@ -371,3 +381,3 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
371 | qDebug(da.toString()); | 381 | qDebug(da.toString()); |
372 | #endif | 382 | #endif |
373 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { | 383 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { |
@@ -410,3 +420,3 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) | |||
410 | } | 420 | } |
411 | 421 | ||
412 | /* the range has to start at 1!!! not with 0!!!! */ | 422 | /* the range has to start at 1!!! not with 0!!!! */ |
@@ -497,5 +507,5 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> | |||
497 | set = mailimap_set_new_single(mail.getNumber()); | 507 | set = mailimap_set_new_single(mail.getNumber()); |
498 | 508 | ||
499 | clist*id_list = 0; | 509 | clist*id_list = 0; |
500 | 510 | ||
501 | /* if path == empty then its a request for the whole rfc822 mail and generates | 511 | /* 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> | |||
512 | } | 522 | } |
513 | 523 | ||
514 | section = mailimap_section_new(section_spec); | 524 | section = mailimap_section_new(section_spec); |
@@ -516,5 +526,5 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> | |||
516 | fetchType = mailimap_fetch_type_new_fetch_att(fetch_att); | 526 | fetchType = mailimap_fetch_type_new_fetch_att(fetch_att); |
517 | 527 | ||
518 | clist*result = 0; | 528 | clist*result = 0; |
519 | 529 | ||
520 | err = mailimap_fetch( m_imap, set, fetchType, &result ); | 530 | err = mailimap_fetch( m_imap, set, fetchType, &result ); |
@@ -522,3 +532,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> | |||
522 | mailimap_fetch_type_free( fetchType ); | 532 | mailimap_fetch_type_free( fetchType ); |
523 | 533 | ||
524 | if (err == MAILIMAP_NO_ERROR && (current=clist_begin(result)) ) { | 534 | if (err == MAILIMAP_NO_ERROR && (current=clist_begin(result)) ) { |
@@ -537,3 +547,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> | |||
537 | } | 547 | } |
538 | } | 548 | } |
539 | } else { | 549 | } else { |
@@ -666,3 +676,3 @@ void IMAPwrapper::fillSingleMsgPart(RecPart&target_part,mailimap_body_type_msg*w | |||
666 | target_part.setLines(which->bd_lines); | 676 | target_part.setLines(which->bd_lines); |
667 | fillBodyFields(target_part,which->bd_fields); | 677 | fillBodyFields(target_part,which->bd_fields); |
668 | } | 678 | } |
@@ -670,3 +680,3 @@ void IMAPwrapper::fillSingleMsgPart(RecPart&target_part,mailimap_body_type_msg*w | |||
670 | void IMAPwrapper::fillMultiPart(RecPart&target_part,mailimap_body_type_mpart*which) | 680 | void IMAPwrapper::fillMultiPart(RecPart&target_part,mailimap_body_type_mpart*which) |
671 | { | 681 | { |
672 | if (!which) return; | 682 | if (!which) return; |
@@ -682,3 +692,3 @@ void IMAPwrapper::fillMultiPart(RecPart&target_part,mailimap_body_type_mpart*whi | |||
682 | } | 692 | } |
683 | } | 693 | } |
684 | } | 694 | } |