-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.cpp | 5 | ||||
-rw-r--r-- | noncore/net/mail/pop3wrapper.cpp | 5 |
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 | |||
@@ -72,12 +72,14 @@ void POP3wrapper::listMessages(const QString &, QList<RecMail> &target ) | |||
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 | } |
@@ -314,13 +316,13 @@ void POP3wrapper::logout() | |||
314 | } | 316 | } |
315 | 317 | ||
316 | 318 | ||
317 | QList<Folder>* POP3wrapper::listFolders() | 319 | QList<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; |
@@ -341,6 +343,7 @@ void POP3wrapper::deleteMail(const RecMail&mail) | |||
341 | } | 343 | } |
342 | } | 344 | } |
343 | 345 | ||
344 | void POP3wrapper::answeredMail(const RecMail&) | 346 | void 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 | |||
@@ -72,12 +72,14 @@ void POP3wrapper::listMessages(const QString &, QList<RecMail> &target ) | |||
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 | } |
@@ -314,13 +316,13 @@ void POP3wrapper::logout() | |||
314 | } | 316 | } |
315 | 317 | ||
316 | 318 | ||
317 | QList<Folder>* POP3wrapper::listFolders() | 319 | QList<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; |
@@ -341,6 +343,7 @@ void POP3wrapper::deleteMail(const RecMail&mail) | |||
341 | } | 343 | } |
342 | } | 344 | } |
343 | 345 | ||
344 | void POP3wrapper::answeredMail(const RecMail&) | 346 | void POP3wrapper::answeredMail(const RecMail&) |
345 | { | 347 | { |
346 | } | 348 | } |
349 | |||