-rw-r--r-- | noncore/net/mail/imapwrapper.cpp | 9 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp index a01a2a9..9ee0dff 100644 --- a/noncore/net/mail/imapwrapper.cpp +++ b/noncore/net/mail/imapwrapper.cpp | |||
@@ -292,19 +292,21 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
292 | addresslist = address_list_to_stringlist(head->env_reply_to->rt_list); | 292 | addresslist = address_list_to_stringlist(head->env_reply_to->rt_list); |
293 | if (addresslist.count()) { | 293 | if (addresslist.count()) { |
294 | m->setReplyto(addresslist.first()); | 294 | m->setReplyto(addresslist.first()); |
295 | } | 295 | } |
296 | } | 296 | } |
297 | m->setMsgid(QString(head->env_message_id)); | 297 | m->setMsgid(QString(head->env_message_id)); |
298 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) { | 298 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) { |
299 | mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date; | 299 | mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date; |
300 | #if 0 | ||
300 | QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); | 301 | QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); |
301 | qDebug("%i %i %i - %i %i %i",d->dt_year,d->dt_month,d->dt_day,d->dt_hour,d->dt_min,d->dt_sec); | 302 | qDebug("%i %i %i - %i %i %i",d->dt_year,d->dt_month,d->dt_day,d->dt_hour,d->dt_min,d->dt_sec); |
302 | qDebug(da.toString()); | 303 | qDebug(da.toString()); |
304 | #endif | ||
303 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { | 305 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { |
304 | size = item->att_data.att_static->att_data.att_rfc822_size; | 306 | size = item->att_data.att_static->att_data.att_rfc822_size; |
305 | } | 307 | } |
306 | } | 308 | } |
307 | /* msg is already deleted */ | 309 | /* msg is already deleted */ |
308 | if (mFlags.testBit(FLAG_DELETED) && m) { | 310 | if (mFlags.testBit(FLAG_DELETED) && m) { |
309 | delete m; | 311 | delete m; |
310 | m = 0; | 312 | m = 0; |
@@ -713,18 +715,23 @@ void IMAPwrapper::deleteMail(const RecMail&mail) | |||
713 | qDebug("error selecting mailbox for delete: %s",m_imap->imap_response); | 715 | qDebug("error selecting mailbox for delete: %s",m_imap->imap_response); |
714 | return; | 716 | return; |
715 | } | 717 | } |
716 | flist = mailimap_flag_list_new_empty(); | 718 | flist = mailimap_flag_list_new_empty(); |
717 | mailimap_flag_list_add(flist,mailimap_flag_new_deleted()); | 719 | mailimap_flag_list_add(flist,mailimap_flag_new_deleted()); |
718 | store_flags = mailimap_store_att_flags_new_set_flags(flist); | 720 | store_flags = mailimap_store_att_flags_new_set_flags(flist); |
719 | set = mailimap_set_new_single(mail.getNumber()); | 721 | set = mailimap_set_new_single(mail.getNumber()); |
720 | err = mailimap_store(m_imap,set,store_flags); | 722 | err = mailimap_store(m_imap,set,store_flags); |
723 | mailimap_set_free( set ); | ||
724 | mailimap_store_att_flags_free(store_flags); | ||
725 | |||
721 | if (err != MAILIMAP_NO_ERROR) { | 726 | if (err != MAILIMAP_NO_ERROR) { |
722 | qDebug("error deleting mail: %s",m_imap->imap_response); | 727 | qDebug("error deleting mail: %s",m_imap->imap_response); |
723 | return; | 728 | return; |
724 | } | 729 | } |
730 | qDebug("deleting mail: %s",m_imap->imap_response); | ||
731 | /* should we realy do that at this moment? */ | ||
725 | err = mailimap_expunge(m_imap); | 732 | err = mailimap_expunge(m_imap); |
726 | if (err != MAILIMAP_NO_ERROR) { | 733 | if (err != MAILIMAP_NO_ERROR) { |
727 | qDebug("error deleting mail: %s",m_imap->imap_response); | 734 | qDebug("error deleting mail: %s",m_imap->imap_response); |
728 | } | 735 | } |
729 | qDebug("Delete successfull"); | 736 | qDebug("Delete successfull %s",m_imap->imap_response); |
730 | } | 737 | } |
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index a01a2a9..9ee0dff 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -292,19 +292,21 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
292 | addresslist = address_list_to_stringlist(head->env_reply_to->rt_list); | 292 | addresslist = address_list_to_stringlist(head->env_reply_to->rt_list); |
293 | if (addresslist.count()) { | 293 | if (addresslist.count()) { |
294 | m->setReplyto(addresslist.first()); | 294 | m->setReplyto(addresslist.first()); |
295 | } | 295 | } |
296 | } | 296 | } |
297 | m->setMsgid(QString(head->env_message_id)); | 297 | m->setMsgid(QString(head->env_message_id)); |
298 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) { | 298 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) { |
299 | mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date; | 299 | mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date; |
300 | #if 0 | ||
300 | QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); | 301 | QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); |
301 | qDebug("%i %i %i - %i %i %i",d->dt_year,d->dt_month,d->dt_day,d->dt_hour,d->dt_min,d->dt_sec); | 302 | qDebug("%i %i %i - %i %i %i",d->dt_year,d->dt_month,d->dt_day,d->dt_hour,d->dt_min,d->dt_sec); |
302 | qDebug(da.toString()); | 303 | qDebug(da.toString()); |
304 | #endif | ||
303 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { | 305 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { |
304 | size = item->att_data.att_static->att_data.att_rfc822_size; | 306 | size = item->att_data.att_static->att_data.att_rfc822_size; |
305 | } | 307 | } |
306 | } | 308 | } |
307 | /* msg is already deleted */ | 309 | /* msg is already deleted */ |
308 | if (mFlags.testBit(FLAG_DELETED) && m) { | 310 | if (mFlags.testBit(FLAG_DELETED) && m) { |
309 | delete m; | 311 | delete m; |
310 | m = 0; | 312 | m = 0; |
@@ -713,18 +715,23 @@ void IMAPwrapper::deleteMail(const RecMail&mail) | |||
713 | qDebug("error selecting mailbox for delete: %s",m_imap->imap_response); | 715 | qDebug("error selecting mailbox for delete: %s",m_imap->imap_response); |
714 | return; | 716 | return; |
715 | } | 717 | } |
716 | flist = mailimap_flag_list_new_empty(); | 718 | flist = mailimap_flag_list_new_empty(); |
717 | mailimap_flag_list_add(flist,mailimap_flag_new_deleted()); | 719 | mailimap_flag_list_add(flist,mailimap_flag_new_deleted()); |
718 | store_flags = mailimap_store_att_flags_new_set_flags(flist); | 720 | store_flags = mailimap_store_att_flags_new_set_flags(flist); |
719 | set = mailimap_set_new_single(mail.getNumber()); | 721 | set = mailimap_set_new_single(mail.getNumber()); |
720 | err = mailimap_store(m_imap,set,store_flags); | 722 | err = mailimap_store(m_imap,set,store_flags); |
723 | mailimap_set_free( set ); | ||
724 | mailimap_store_att_flags_free(store_flags); | ||
725 | |||
721 | if (err != MAILIMAP_NO_ERROR) { | 726 | if (err != MAILIMAP_NO_ERROR) { |
722 | qDebug("error deleting mail: %s",m_imap->imap_response); | 727 | qDebug("error deleting mail: %s",m_imap->imap_response); |
723 | return; | 728 | return; |
724 | } | 729 | } |
730 | qDebug("deleting mail: %s",m_imap->imap_response); | ||
731 | /* should we realy do that at this moment? */ | ||
725 | err = mailimap_expunge(m_imap); | 732 | err = mailimap_expunge(m_imap); |
726 | if (err != MAILIMAP_NO_ERROR) { | 733 | if (err != MAILIMAP_NO_ERROR) { |
727 | qDebug("error deleting mail: %s",m_imap->imap_response); | 734 | qDebug("error deleting mail: %s",m_imap->imap_response); |
728 | } | 735 | } |
729 | qDebug("Delete successfull"); | 736 | qDebug("Delete successfull %s",m_imap->imap_response); |
730 | } | 737 | } |