summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/pop3wrapper.cpp5
-rw-r--r--noncore/net/mail/pop3wrapper.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
index b4a8f4b..a33a16b 100644
--- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp
@@ -70,16 +70,18 @@ void POP3wrapper::listMessages(const QString &, QList<RecMail> &target )
70 70
71 login(); 71 login();
72 if (!m_pop3) return; 72 if (!m_pop3) return;
73 mailpop3_list( m_pop3, &messages ); 73 mailpop3_list( m_pop3, &messages );
74 74
75 for (unsigned int i = 0; i < carray_count(messages);++i) { 75 for (unsigned int i = 0; i < carray_count(messages);++i) {
76 mailpop3_msg_info *info; 76 mailpop3_msg_info *info;
77 err = mailpop3_get_msg_info(m_pop3,i+1,&info); 77 err = mailpop3_get_msg_info(m_pop3,i+1,&info);
78 if (info->msg_deleted)
79 continue;
78 err = mailpop3_header( m_pop3, info->msg_index, &header, &length ); 80 err = mailpop3_header( m_pop3, info->msg_index, &header, &length );
79 if ( err != MAILPOP3_NO_ERROR ) { 81 if ( err != MAILPOP3_NO_ERROR ) {
80 qDebug( "POP3: error retrieving header msgid: %i", info->msg_index ); 82 qDebug( "POP3: error retrieving header msgid: %i", info->msg_index );
81 free(header); 83 free(header);
82 return; 84 return;
83 } 85 }
84 RecMail *mail = parseHeader( header ); 86 RecMail *mail = parseHeader( header );
85 mail->setNumber( info->msg_index ); 87 mail->setNumber( info->msg_index );
@@ -312,17 +314,17 @@ void POP3wrapper::logout()
312 mailpop3_free( m_pop3 ); 314 mailpop3_free( m_pop3 );
313 m_pop3 = NULL; 315 m_pop3 = NULL;
314} 316}
315 317
316 318
317QList<Folder>* POP3wrapper::listFolders() 319QList<Folder>* POP3wrapper::listFolders()
318{ 320{
319 /* TODO: integrate MH directories 321 /* TODO: integrate MH directories
320 but not vor version 0.1 ;) 322 but not before version 0.1 ;)
321 */ 323 */
322 QList<Folder> * folders = new QList<Folder>(); 324 QList<Folder> * folders = new QList<Folder>();
323 folders->setAutoDelete( false ); 325 folders->setAutoDelete( false );
324 Folder*inb=new Folder("INBOX"); 326 Folder*inb=new Folder("INBOX");
325 folders->append(inb); 327 folders->append(inb);
326 return folders; 328 return folders;
327} 329}
328 330
@@ -339,8 +341,9 @@ void POP3wrapper::deleteMail(const RecMail&mail)
339 if (err != MAILPOP3_NO_ERROR) { 341 if (err != MAILPOP3_NO_ERROR) {
340 qDebug("error deleting mail"); 342 qDebug("error deleting mail");
341 } 343 }
342} 344}
343 345
344void POP3wrapper::answeredMail(const RecMail&) 346void POP3wrapper::answeredMail(const RecMail&)
345{ 347{
346} 348}
349
diff --git a/noncore/net/mail/pop3wrapper.cpp b/noncore/net/mail/pop3wrapper.cpp
index b4a8f4b..a33a16b 100644
--- a/noncore/net/mail/pop3wrapper.cpp
+++ b/noncore/net/mail/pop3wrapper.cpp
@@ -70,16 +70,18 @@ void POP3wrapper::listMessages(const QString &, QList<RecMail> &target )
70 70
71 login(); 71 login();
72 if (!m_pop3) return; 72 if (!m_pop3) return;
73 mailpop3_list( m_pop3, &messages ); 73 mailpop3_list( m_pop3, &messages );
74 74
75 for (unsigned int i = 0; i < carray_count(messages);++i) { 75 for (unsigned int i = 0; i < carray_count(messages);++i) {
76 mailpop3_msg_info *info; 76 mailpop3_msg_info *info;
77 err = mailpop3_get_msg_info(m_pop3,i+1,&info); 77 err = mailpop3_get_msg_info(m_pop3,i+1,&info);
78 if (info->msg_deleted)
79 continue;
78 err = mailpop3_header( m_pop3, info->msg_index, &header, &length ); 80 err = mailpop3_header( m_pop3, info->msg_index, &header, &length );
79 if ( err != MAILPOP3_NO_ERROR ) { 81 if ( err != MAILPOP3_NO_ERROR ) {
80 qDebug( "POP3: error retrieving header msgid: %i", info->msg_index ); 82 qDebug( "POP3: error retrieving header msgid: %i", info->msg_index );
81 free(header); 83 free(header);
82 return; 84 return;
83 } 85 }
84 RecMail *mail = parseHeader( header ); 86 RecMail *mail = parseHeader( header );
85 mail->setNumber( info->msg_index ); 87 mail->setNumber( info->msg_index );
@@ -312,17 +314,17 @@ void POP3wrapper::logout()
312 mailpop3_free( m_pop3 ); 314 mailpop3_free( m_pop3 );
313 m_pop3 = NULL; 315 m_pop3 = NULL;
314} 316}
315 317
316 318
317QList<Folder>* POP3wrapper::listFolders() 319QList<Folder>* POP3wrapper::listFolders()
318{ 320{
319 /* TODO: integrate MH directories 321 /* TODO: integrate MH directories
320 but not vor version 0.1 ;) 322 but not before version 0.1 ;)
321 */ 323 */
322 QList<Folder> * folders = new QList<Folder>(); 324 QList<Folder> * folders = new QList<Folder>();
323 folders->setAutoDelete( false ); 325 folders->setAutoDelete( false );
324 Folder*inb=new Folder("INBOX"); 326 Folder*inb=new Folder("INBOX");
325 folders->append(inb); 327 folders->append(inb);
326 return folders; 328 return folders;
327} 329}
328 330
@@ -339,8 +341,9 @@ void POP3wrapper::deleteMail(const RecMail&mail)
339 if (err != MAILPOP3_NO_ERROR) { 341 if (err != MAILPOP3_NO_ERROR) {
340 qDebug("error deleting mail"); 342 qDebug("error deleting mail");
341 } 343 }
342} 344}
343 345
344void POP3wrapper::answeredMail(const RecMail&) 346void POP3wrapper::answeredMail(const RecMail&)
345{ 347{
346} 348}
349