author | alwin <alwin> | 2003-12-14 17:33:16 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-14 17:33:16 (UTC) |
commit | 353e1da81b235d7798763bce76428fb473108fb6 (patch) (unidiff) | |
tree | e9b8f8cbe3ee37512a1c9fc0409185f4fb6c9883 /noncore/net/mail/imapwrapper.cpp | |
parent | 87425f2b26c01cc9bcc9bfac21a707462b410f13 (diff) | |
download | opie-353e1da81b235d7798763bce76428fb473108fb6.zip opie-353e1da81b235d7798763bce76428fb473108fb6.tar.gz opie-353e1da81b235d7798763bce76428fb473108fb6.tar.bz2 |
- replied mails will get the flag answered
- text fix in preparing the message for a reply
Diffstat (limited to 'noncore/net/mail/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/imapwrapper.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp index 912a412..b253b49 100644 --- a/noncore/net/mail/imapwrapper.cpp +++ b/noncore/net/mail/imapwrapper.cpp | |||
@@ -736,6 +736,36 @@ void IMAPwrapper::deleteMail(const RecMail&mail) | |||
736 | err = mailimap_expunge(m_imap); | 736 | err = mailimap_expunge(m_imap); |
737 | if (err != MAILIMAP_NO_ERROR) { | 737 | if (err != MAILIMAP_NO_ERROR) { |
738 | qDebug("error deleting mail: %s",m_imap->imap_response); | 738 | qDebug("error deleting mail: %s",m_imap->imap_response); |
739 | } | 739 | } |
740 | qDebug("Delete successfull %s",m_imap->imap_response); | 740 | qDebug("Delete successfull %s",m_imap->imap_response); |
741 | } | 741 | } |
742 | |||
743 | void IMAPwrapper::answeredMail(const RecMail&mail) | ||
744 | { | ||
745 | mailimap_flag_list*flist; | ||
746 | mailimap_set *set; | ||
747 | mailimap_store_att_flags * store_flags; | ||
748 | int err; | ||
749 | login(); | ||
750 | if (!m_imap) { | ||
751 | return; | ||
752 | } | ||
753 | const char *mb = mail.getMbox().latin1(); | ||
754 | err = mailimap_select( m_imap, (char*)mb); | ||
755 | if ( err != MAILIMAP_NO_ERROR ) { | ||
756 | qDebug("error selecting mailbox for mark: %s",m_imap->imap_response); | ||
757 | return; | ||
758 | } | ||
759 | flist = mailimap_flag_list_new_empty(); | ||
760 | mailimap_flag_list_add(flist,mailimap_flag_new_answered()); | ||
761 | store_flags = mailimap_store_att_flags_new_set_flags(flist); | ||
762 | set = mailimap_set_new_single(mail.getNumber()); | ||
763 | err = mailimap_store(m_imap,set,store_flags); | ||
764 | mailimap_set_free( set ); | ||
765 | mailimap_store_att_flags_free(store_flags); | ||
766 | |||
767 | if (err != MAILIMAP_NO_ERROR) { | ||
768 | qDebug("error marking mail: %s",m_imap->imap_response); | ||
769 | return; | ||
770 | } | ||
771 | } | ||