summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper
authoralwin <alwin>2003-12-13 02:36:57 (UTC)
committer alwin <alwin>2003-12-13 02:36:57 (UTC)
commita170120c655169de904ff282e23461ba4eef2b47 (patch) (unidiff)
tree0c7f7612fbe9610cf4bc23a5b9aba5f5591d7caf /noncore/net/mail/libmailwrapper
parentf689ef512cfc0a56fead4839a6b2e24a6ee282e0 (diff)
downloadopie-a170120c655169de904ff282e23461ba4eef2b47.zip
opie-a170120c655169de904ff282e23461ba4eef2b47.tar.gz
opie-a170120c655169de904ff282e23461ba4eef2b47.tar.bz2
mails will marked as read now
Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
index 7b75ffa..3941cec 100644
--- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
@@ -322,26 +322,26 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail)
322 clistcell *current; 322 clistcell *current;
323 mailimap_fetch_att *fetchAtt; 323 mailimap_fetch_att *fetchAtt;
324 mailimap_fetch_type *fetchType; 324 mailimap_fetch_type *fetchType;
325 mailimap_set *set; 325 mailimap_set *set;
326 mailimap_body*body_desc; 326 mailimap_body*body_desc;
327 327
328 mb = mail.getMbox().latin1(); 328 mb = mail.getMbox().latin1();
329 329
330 login(); 330 login();
331 if (!m_imap) { 331 if (!m_imap) {
332 return body; 332 return body;
333 } 333 }
334 /* select mailbox READONLY for operations */ 334
335 err = mailimap_examine( m_imap, (char*)mb); 335 err = mailimap_select( m_imap, (char*)mb);
336 if ( err != MAILIMAP_NO_ERROR ) { 336 if ( err != MAILIMAP_NO_ERROR ) {
337 qDebug("error selecting mailbox: %s",m_imap->imap_response); 337 qDebug("error selecting mailbox: %s",m_imap->imap_response);
338 return body; 338 return body;
339 } 339 }
340 340
341 result = clist_new(); 341 result = clist_new();
342 /* the range has to start at 1!!! not with 0!!!! */ 342 /* the range has to start at 1!!! not with 0!!!! */
343 set = mailimap_set_new_interval( mail.getNumber(),mail.getNumber() ); 343 set = mailimap_set_new_interval( mail.getNumber(),mail.getNumber() );
344 fetchAtt = mailimap_fetch_att_new_bodystructure(); 344 fetchAtt = mailimap_fetch_att_new_bodystructure();
345 fetchType = mailimap_fetch_type_new_fetch_att(fetchAtt); 345 fetchType = mailimap_fetch_type_new_fetch_att(fetchAtt);
346 err = mailimap_fetch( m_imap, set, fetchType, &result ); 346 err = mailimap_fetch( m_imap, set, fetchType, &result );
347 mailimap_set_free( set ); 347 mailimap_set_free( set );
@@ -450,26 +450,25 @@ QString IMAPwrapper::fetchPart(const RecMail&mail,const QValueList<int>&path,boo
450 const char*mb; 450 const char*mb;
451 int err; 451 int err;
452 mailimap_fetch_type *fetchType; 452 mailimap_fetch_type *fetchType;
453 mailimap_set *set; 453 mailimap_set *set;
454 clistcell*current,*cur; 454 clistcell*current,*cur;
455 455
456 login(); 456 login();
457 if (!m_imap) { 457 if (!m_imap) {
458 return body; 458 return body;
459 } 459 }
460 if (!internal_call) { 460 if (!internal_call) {
461 mb = mail.getMbox().latin1(); 461 mb = mail.getMbox().latin1();
462 /* select mailbox READONLY for operations */ 462 err = mailimap_select( m_imap, (char*)mb);
463 err = mailimap_examine( m_imap, (char*)mb);
464 if ( err != MAILIMAP_NO_ERROR ) { 463 if ( err != MAILIMAP_NO_ERROR ) {
465 qDebug("error selecting mailbox: %s",m_imap->imap_response); 464 qDebug("error selecting mailbox: %s",m_imap->imap_response);
466 return body; 465 return body;
467 } 466 }
468 } 467 }
469 set = mailimap_set_new_single(mail.getNumber()); 468 set = mailimap_set_new_single(mail.getNumber());
470 clist*id_list=clist_new(); 469 clist*id_list=clist_new();
471 for (unsigned j=0; j < path.count();++j) { 470 for (unsigned j=0; j < path.count();++j) {
472 uint32_t * p_id = (uint32_t *)malloc(sizeof(*p_id)); 471 uint32_t * p_id = (uint32_t *)malloc(sizeof(*p_id));
473 *p_id = path[j]; 472 *p_id = path[j];
474 clist_append(id_list,p_id); 473 clist_append(id_list,p_id);
475 } 474 }